我需要在hey
字符前後插入一些文字。 我需要一個僅限CSS的解決方案。在前後插入一些文字
我的HTML:
<span class="wsite-headline">
<font size="5">hey</font>
<br>
<strong>dude</strong>
</span>
我已經嘗試此CSS:
.wsite-headline font:before { content "before"; }
.wsite-headline font:after { content "after"; }
但它不工作。
有什麼想法?
你缺少之間的冒號內容屬性和價值。 –
使用jquery .before和after – devpro
您需要在';之前編寫'content:「以使您的css有效。 –