How to line-break from css, without using
?

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

output:

hello
How are you

code:

hello
How are you

Ho

26条回答
  •  生来不讨喜
    2020-11-22 16:33

    You need to declare the content within . After it the line will be break.

    \A means line feed character.

    .class_name::after {
      content: "\A";
      white-space: pre;
    }
    

提交回复
热议问题