How without any spans, divs, etc. make a circle on the side, for example, red, and the text is black?
ul { list-style-type: disc; color: red; } ul li { color: #000000 } <ul> <li>one</li> <li>two</li> <li>three</li> </ul> How without any spans, divs, etc. make a circle on the side, for example, red, and the text is black?
ul { list-style-type: disc; color: red; } ul li { color: #000000 } <ul> <li>one</li> <li>two</li> <li>three</li> </ul> Use pseudo-elements : before or : after
ul{ padding: 0; list-style: none; } ul > li{ position: relative; padding-left: 15px; } ul > li:before{ content: ''; position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #f00; } ul > li:hover:before{ background: #00f; } <ul> <li>list 1</li> <li>list 2</li> <li>list 3</li> </ul> Source: https://ru.stackoverflow.com/questions/430379/
All Articles