a[href^="mailto:"]:before { content: "\2709"; }
.phone:before { content: "\2706"; }
.important:before { content: "\27BD"; }
blockquote:before { content: "\275D"; }
blockquote:after { content: "\275E"; }
.alert:before { content: "\26A0"; }
<p>
<a href="mailto:[email protected]">
[email protected]
</a>
</p>
<p class="phone">
555-555-5555
</p>
<p class="important">
REMEMBER: drink slushies too fast.
</p>
<blockquote>
Designers tend to whisper, ad agencies tend to shout.
</blockquote>
<p class="alert">
Stranger Danger!
<p>
对于电话,您还可以使用此方法
如何使菜单(链接)垂直排列(从上到下)
在每个链接前包含不同的图像或图标。
如何使用 CSS 和 HTML 实现?
我想使用 ul 和 li 进行导航
您可以为 ul 指定一个 nav 的 id/class(例如)进行样式设置,并且可以为每个 li 指定一个 id/class
.nav
.nav first { background: url(“”) }
.nav second
等等。
对于不常见的 Unicode 图标,请将您的代码从十进制转换为十六进制。例如,不要使用 ▲,而使用
content: “\25B2”;
http://www.binaryhexconverter.com/decimal-to-hex-converter
跨浏览器兼容性怎么样???它们在旧浏览器上是否有效?非常感谢!!!