Ich versuche, das erste Wort eines Absatzes zu stylen, aber es funktioniert nicht. Kann jemand helfen. Ich kann den ersten Buchstaben formatieren, aber nicht das erste Wort. Ich habe Gründe, <span>
nicht zu verwenden, um dies zu tun. JSFiDDLE HEREStil erstes Wort des Absatzes
.product-title {
width: 100vw;
text-align: right;
font-size: 4.5vw;
letter-spacing: -0.05em;
color: #ffffff;
"
}
#first-letter-here p::first-letter {
font-family: arial;
font-weight: 900;
font-size: 3em;
}
#first-word-here p::first-word {
font-family: arial;
font-weight: 900;
font-size: 3em;
}
<div id="first-letter-here">
<p>
Milk and cookies.
</p>
</div>
<div id="first-word-here">
<p>
Milk and cookies.
</p>
</div>
Es gibt kein ':: first-word' psuedo-Element. –
http://stackoverflow.com/questions/55612/css-to-increase-size-of-firstword - '# first-word-here> p: vorher { Schriftfamilie: arial; Schriftgewicht: 900; Schriftgröße: 3em; Inhalt: "Milch" } ' – mplungjan