标签: html css pseudo-element pseudo-class pth
我需要CSS选择最后一个单词。尝试:: nth-last-word和:: last-word - dosent做任何事情。
.site-title a { font-size: 30px; } .site-title a::last-word { color: #c73434; }
<div class="site-title"> <a href="#">first word</a> </div>