::before/::after中使用::marker伪元素实例页面
回到相关文章 »效果:
一个标签5种颜色
代码:
CSS代码:
.target::before { content: '左边符号颜色是?'; display: list-item; list-style-position: inside; color: deepskyblue; } .target::before::marker { color: red; } .target::after { content: '右边符号颜色是?'; display: list-item; list-style-position: inside; color: olive; } .target::before::marker { content: '橙色'; color: orange; direction: rtl; }
HTML代码:
<div class="target">一个标签5种颜色</div>