拼網頁div+css是文字補白速記

來源:互聯網
上載者:User

1.想要how are you 中的空格有效:需加 word-spacing:20px;

2.固定div的寬度後,裡面的文本是否想要溢出or隱藏: 需要設定 text-overflow:ellipsis;overflow:hidden;        text-overflow:ellipsis; overflow:visible;

3.文本中的空白是否有效:white-space:nowrap;//一行顯示    white-space:pre;//遇到空白的換行才換行

4.根據詞的屬性換行 word-break:break-all;//是根據寬度而換行,不管這個詞是否寫完整立即換行。

5.這個換行和上面的差不多: word-wrap:break-word;

 

 

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.