is it possible to change the color of the bullet?
ReportQuestion
3 years ago 751 views
The color of the bullet is always the color of the first text of the list. So, if you want to change the color of the bullet, you must change the color of the text.
<
html
>
<
head
>
<
title
>Changing Bullet Colors</
title
>
<
style
>
h3{
color:green;
}
ul{
list-style: none;
}
ul li::before {
/*\25E6 is the CSS Code/unicode for a circle */
content: "\25E6";
color: green;
display: inline-block;
width: 1em;
margin-left: -0.9em;
font-weight: bold;
font-size:1.1rem;
}
</
style
>
</
head
>
<
body
>
<
h3
>Best Movies</
h3
>
<!-- Create an Unordered List -->
<
ul
>
<
li
>Star Wars</
li
>
<
li
>Back to the future</
li
>
<
li
>Ghostbusters</
li
>
<
li
>The princess bride</
li
>
<
li
>Shaun of the dead</
li
>
</
ul
>
</
body
>
</
html
>
Thread Reply