Is there an easy way to change the color of a bull

2019-01-06 10:26发布

All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it.

I know I could just use an image; I'd rather not do that if I can help it.

16条回答
可以哭但决不认输i
2楼-- · 2019-01-06 11:14

You'll want to set a "list-style" via CSS, and give it a color: value. Example:

ul.colored {list-style: color: green;}
查看更多
冷血范
3楼-- · 2019-01-06 11:15

Just do a bullet in a graphics program and use list-style-image:

ul {
  list-style-image:url('gray-bullet.gif');
}
查看更多
淡お忘
4楼-- · 2019-01-06 11:18

It works as well if we set color for each elements for example: I added some Margin to left now.

<article class="event-item">
    <p>Black text here</p>
</article>

.event-item{
    list-style-type: disc;
    display: list-item;
    color: #ff6f9a;
     margin-left: 25px;
}
.event-item p {
    margin: 0;
    color: initial;
}
查看更多
戒情不戒烟
5楼-- · 2019-01-06 11:18

Just use CSS:

<li style='color:#e0e0e0'>something</li>
查看更多
登录 后发表回答