html - 我们可以将列表样式类型的列表设置为绿色点吗?

标签 html css

我们可以将列表样式类型的列表做成绿色圆点吗?

我的限制是我不想使用列表样式图像,我不能在无序列表中编辑 html。

最佳答案

更新 naveen 的答案,使用元素符号字符以获得更好的渲染效果。

ul#mylist{
    list-style-type: square;
}
ul#mylist li:before{
    content: "•";
    margin-right: 10px;
    font-weight: bold;
    color: #00FF00;
}

我想知道这个是否合法,因为代码包含一个特殊字符。

安托万

关于html - 我们可以将列表样式类型的列表设置为绿色点吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6982036/

相关文章:

javascript - 为 Jquery 的 slider handle 应用新的背景颜色

jquery - 在 jQuery 中用自定义 div 替换动画宽度

html - @font-face 在 firefox 和 Internet Explorer 中不工作

html - :hover isn't applying full background to li

html - 如何在html中将文字放在图像上?

javascript - 在自定义元素内附加自定义元素会导致隐藏元素

css - 如何实现 Bootstrap 多个导航栏

css - Angular 2 ngClass 条件数据?

javascript - 如何减少 d3.scale.category10() 中的颜色数量?

html - 为什么背景渐变将内容向下推?