幸运飞艇停吗

ASP源碼.NET源碼PHP源碼JSP源碼JAVA源碼DELPHI源碼PB源碼VC源碼VB源碼Android源碼
當前位置:首頁 >> 網頁制作 >> Javascript教程 >> css去掉table的td單元格的間距cellspacing,設置隔行顯示不同背景顏色

css去掉table的td單元格的間距cellspacing,設置隔行顯示不同背景顏色

來源:網絡整理     時間:2018-10-17     關鍵詞:

BENPIANWENZHANGZHUYAOJIESHAOLE" cssQUDIAOtableDEtdDANYUANGEDEJIANJUcellspacing,SHEZHIGEXINGXIANSHIBUTONGBEIJINGYANSE",ZHUYAOSHEJIDAOFANGMIANDENEIRONG,DUIYUJavascriptJIAOCHENGGANXINGQUDETONGXUEKEYICANKAOYIXIA: QUDIAODANYUANGEJIANGEDANYUANGEJIANGEDUIYINGtableBIAOQIANSHANGDE cellpadding HE cellspacing,ZHELIKEYIYONGCSSSHIXIAN,cellpadding DUIYING td DE...

QUDIAODANYUANGEJIANGE

DANYUANGEJIANGEDUIYINGtableBIAOQIANSHANGDE cellpadding HE cellspacing,ZHELIKEYIYONGCSSSHIXIAN,cellpadding DUIYING td DE padding。 QUCHUBIANKUANG cellspacing DEJIANGEYOUYIXIALIANGZHONGFANGFA:

FANGFAYI:  border-collapse: collapse

幸运飞艇停吗border-collapse MORENZHIWEIseparate,JIMEIGEtdDANYUANGEDOUYOUDULIDEBIANKUANG;collapseBIAOSHIXIANGLINDANYUANGEGONGYONGYIGEBIANKUANG,CISHI border-spacing JIANGBUQIZUOYONG,SHEZHIWEIcollapseDANYUANGEJIANJUJIANGXIAOSHI。

table {

    border-collapse: collapse;

}

table tr td {

    border: solid 2px #222;

}

FANGFAER: SHEZHI border-spacing: 0

CISHIBIANKUANGJIANGEWEI0,KANSHANGQUXIANGSHIBEIHEBINGLE,DANMEIGEtdDOUHUIYOULIANGGEBIANKUANG,XIANGLINtdBIANKUANGHUIBIZUIZUO/ZUIYOUDEBULINtdDEBIANKUANGHOU2BEI,WEILESHIDANYUANGEBIANKUANGKUANDUYIZHIXUYAOTESHUCHULI:

table {

    border-spacing: 0;

    border-bottom: solid 2px #222;

    border-right: solid 2px #222;

}

table tr td {

幸运飞艇停吗    border-top: solid 2px #222;

    border-left: solid 2px #222;

}

GEXINGXIANSHIBUTONGBEIJINGYANSE

幸运飞艇停吗KESHIYONGnth-childWEILEISHIXIAN,CANSHUFENWEIodd(QISHUXING)HE even(OUSHUXING),ZHIXUFUXIEYIGEJIKE

table tr {

幸运飞艇停吗    background: #fff;

}

table tr:nth-child(even) {

幸运飞艇停吗    background: #ccc;

}


完整示例  http://jsbin.com/yovunum/edit?html,css,output

幸运飞艇停吗 YISHANGJIUJIESHAOLE cssQUDIAOtableDEtdDANYUANGEDEJIANJUcellspacing,SHEZHIGEXINGXIANSHIBUTONGBEIJINGYANSE,BAOKUOLEFANGMIANDENEIRONG,XIWANGDUIJavascriptJIAOCHENGYOUXINGQUDEPENGYOUYOUSUOBANGZHU。

BENWENWANGZHILIANJIE:http://snifly.cn/article/detail_4593251.html

幸运飞艇停吗

相關圖片

相關文章