Can you apply CSS only on text that is wrapped, i.e. the second and subsequent lines?

后端 未结 4 1687
心在旅途
心在旅途 2021-01-07 18:07

I want to put a margin-left on only the text that is wrapped, i.e. text after the first line:

This is text with no margin left
     this text ha         


        
4条回答
  •  余生分开走
    2021-01-07 18:19

    You could wrap the line you want to wrap in a span and apply:

    display: block;
    margin-left: 12px;
    

    Giving it display: block will make it wrap to a new line and the margin pushes it off to the right.

提交回复
热议问题