How can I apply the text-indent only to lines that are wrapped (have a line break)?
Right now, it looks like this:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Lorem ipsum dolor sit amet.
But I want it to look like this:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Lorem ipsum dolor sit amet.
Is that possible using CSS 3? My text-indent
is set to text-indent: 20px
答案 0 :(得分:1)
这是不可能的,css3 ::first-line
中有属性,但以下属性可以与:: first-line
font properties
color properties
background properties
word-spacing
letter-spacing
text-decoration
vertical-align
text-transform
line-height
clear
这不适用于 text -indent
您可以为每个多行文字添加另一个类或标记或范围 OR 使用Javascript