Force word wrap through CSS

后端 未结 7 1212
忘掉有多难
忘掉有多难 2021-01-04 00:10

At the moment TEST TEST appear side by side. How can I push one down onto a second line? Only through CSS.

TEST TEST

相关标签:
7条回答
  • 2021-01-04 00:41
    <html><head>
    <style>
    #box {    
        width:5px;
        display:table;
        white-space: pre-wrap; /* css-3 */
        white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
        white-space: -pre-wrap; /* Opera 4-6 */
        white-space: -o-pre-wrap; /* Opera 7 */
        word-wrap: break-word; /* Internet Explorer 5.5+ */
    }
    </style></head>
    <body>
    <div id="box">TEST TEST</div>
    </body>
    </html>
    
    0 讨论(0)
提交回复
热议问题