css实现强制不换行/自动换行/强制换行

css实现强制不换行/自动换行/强制换行

强制不换行

  1. div{
  2. white-space:nowrap;
  3. }

自动换行

  1. div{
  2. word-wrap: break-word;
  3. word-break: normal;
  4. }

强制英文单词断行

  1. div{
  2. word-break:break-all;
  3. }

Leave a Comment

You must be logged in to post a comment.