亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長(zhǎng)資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    css如何設(shè)置td溢出隱藏

    方法:首先使用“word-break:keep-all”語(yǔ)句設(shè)置不換行;然后使用“overflow:hidden”語(yǔ)句設(shè)置超出隱藏部分;最后使用“text-overflow:ellipsis”語(yǔ)句設(shè)置溢出顯示省略號(hào)。

    css如何設(shè)置td溢出隱藏

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

    td溢出隱藏

    table{         width:100px;         table-layout:fixed;/* 只有定義了表格的布局算法為fixed,下面td的定義才能起作用。 */     }     td{         width:100%;         word-break:keep-all;/* 不換行 */         white-space:nowrap;/* 不換行 */         overflow:hidden;/* 內(nèi)容超出寬度時(shí)隱藏超出部分的內(nèi)容 */         text-overflow:ellipsis;/* 當(dāng)對(duì)象內(nèi)文本溢出時(shí)顯示省略標(biāo)記(...) ;需與overflow:hidden;一起使用*/     }

    全部代碼:

    <!DOCTYPE html>  <html>  <head>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  <title>document</title>  <style> table{         width:100px;         table-layout:fixed;/* 只有定義了表格的布局算法為fixed,下面td的定義才能起作用。 */     }     td{         width:100%;         word-break:keep-all;/* 或是 white-space:nowrap;不換行 */         overflow:hidden;/* 內(nèi)容超出寬度時(shí)隱藏超出部分的內(nèi)容 */         text-overflow:ellipsis;/* 當(dāng)對(duì)象內(nèi)文本溢出時(shí)顯示省略標(biāo)記(...) ;需與overflow:hidden;一起使用*/     } </style> </head>  <body>     <table border="1">         <tr>             <td>19999</td>             <td>19999</td>         </tr>         <tr>             <td>19999</td>             <td>19999</td>         </tr>         <tr>             <td>19999</td>             <td>19999</td>         </tr>     </table> </body>  </html>

    效果截圖:

    css如何設(shè)置td溢出隱藏

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

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