How to line-break from css, without using
?

后端 未结 26 1488
攒了一身酷
攒了一身酷 2020-11-22 15:49

output:

hello
How are you

code:

hello
How are you

Ho

26条回答
  •  一生所求
    2020-11-22 16:19

    You can add a lot of padding and force text to be split to new line, for example

    p{
        padding-right: 50%;
    }
    

    Worked fine for me in a situation with responsive design, where only within a certain width range it was needed for text to be split.

提交回复
热议问题