用CSS样式固定表格宽度

在table或div里显示文章的时候,如果是汉字,文章会根据table和div的width属性自动分行,但如果是英文,当单词长度超过table或div宽度的时候,table/div便会被撑开,有时候会造成页面很难看,这时可以给table/div设置如下样式:word-break:break-all;word-wrap:break-word; 单词超长的时候能够自动截断单词分行,避免上述情况的发生。

随机文章:

1、网络图形效果探索(一)
https://www.onexin.net/%e7%bd%91%e7%bb%9c%e5%9b%be%e5%bd%a2%e6%95%88%e6%9e%9c%e6%8e%a2%e7%b4%a2%ef%bc%88%e4%b8%80%ef%bc%89/

2、用MariaDB替代Oracle的MySQL
https://www.onexin.net/oracles-mysql-with-mariadb-alternative/

3、一键关闭discuz!X主题回收站
https://www.onexin.net/a-key-to-turn-off-discuz-x-theme-recycle-bin/

4、CSS语法手册之分类属性
https://www.onexin.net/properties-of-the-css-syntax-manual-classification/

5、對幾個概念的辨析:正體字、俗體字、簡體字、繁體字、簡化字
https://www.onexin.net/analysis-of-several-concepts-the-traditional-characters-vulgar-traditional-characters-simplified-chinese-traditional-chinese-simplified/

转载请注明出处:https://www.onexin.net/%e7%94%a8css%e6%a0%b7%e5%bc%8f%e5%9b%ba%e5%ae%9a%e8%a1%a8%e6%a0%bc%e5%ae%bd%e5%ba%a6/

Leave a Reply

Your email address will not be published. Required fields are marked *