Hoe OM - Verander kolpuntkleur van lyste
Leer hoe om kolpuntkleure vir lyste met CSS te verander.
Verander koeëlkleur
- Adele
- Agnes
- Billy
- Bob
Stap 1) Voeg HTML by:
Skep 'n basiese lys:
Voorbeeld
<ul>
<li>Adele</li>
<li>Agnes</li>
<li>Billy</li>
<li>Bob</li>
</ul>
Stap 2) Voeg CSS by:
By verstek is dit nie moontlik om die kolpuntkleur van 'n lysitem te verander nie. U kan egter 'n paar CSS-truuks doen om dit moontlik te maak. Let daarop dat jy dit dalk 'n bietjie anders moet aanpas as jy 'n CSS-raamwerk of 'n spesiale stylblad gebruik:
Voorbeeld
ul {
list-style: none; /* Remove default bullets */
}
ul li::before {
content: "\2022"; /* Add content: \2022 is the CSS Code/unicode for a
bullet */
color: red; /* Change the color */
font-weight:
bold; /* If you want it to be bold */
display: inline-block; /*
Needed to add space between the bullet and the text */
width: 1em;
/* Also needed for space (tweak if needed) */
margin-left: -1em; /*
Also needed for space (tweak if needed) */
}