Keep a line of text as a single line - wrap the whole line or none at all

前端 未结 2 1578
小蘑菇
小蘑菇 2021-01-31 00:57

I\'d like to keep a line of text together such that either the whole line drops down a line or none at all

Acceptable

How do I wrap this         


        
2条回答
  •  青春惊慌失措
    2021-01-31 01:43

    You can use white-space: nowrap; to define this behaviour:

    // HTML:
    

    .nowrap {
      white-space: nowrap ;
    }

    How do I wrap this line of text - asked by Peter 2 days ago

    // CSS:
    .nowrap {
      white-space: nowrap ;
    }
    

提交回复
热议问题