欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長(zhǎng)資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          css如何設(shè)置td寬度

          在css中,可以使用width屬性設(shè)置td寬度,只需要給td元素設(shè)置“width:寬度值;”樣式即可。width屬性設(shè)置元素的寬度,該屬性定義元素內(nèi)容區(qū)的寬度,在內(nèi)容區(qū)外面可以增加內(nèi)邊距、邊框和外邊距。

          css如何設(shè)置td寬度

          本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。

          css直接使用width屬性設(shè)置表格td的寬度:

          示例:

          <!DOCTYPE html> <html> <head> <meta charset="utf-8">  <title>document</title>  <style> td.box1 {     width:10%;     border: medium solid red     } td.box3 {     width:15%;     border: medium solid red     } td.box5 {     width:20%;     border: medium solid red     } td.box4 {     width:45%;     border: medium solid red     } </style> </head> <body>     <table width="100%">           <td class="box1">10%</td>         <td class="box1">10%</td>         <td class="box3">15%</td>         <td class="box4">45%</td>         <td class="box5">20%</td>         </table> </body> </html>

          效果圖:

          css如何設(shè)置td寬度

          width 屬性設(shè)置元素的寬度。

          這個(gè)屬性定義元素內(nèi)容區(qū)的寬度,在內(nèi)容區(qū)外面可以增加內(nèi)邊距、邊框和外邊距。

          屬性值:

          • auto 默認(rèn)值。瀏覽器可計(jì)算出實(shí)際的寬度。

          • length 使用 px、cm 等單位定義寬度。

          • % 定義基于包含塊(父元素)寬度的百分比寬度。

          • inherit 規(guī)定應(yīng)該從父元素繼承 width 屬性的值。

          推薦學(xué)習(xí):css視頻教程

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)