Answer the question
In order to leave comments, you need to log in
How to style list item with custom marker?
It needs to be applied list-style-position
to lists, but since the standard marker has been canceled and a custom marker is used instead, the property does not work. It is necessary that there are indents as on the screen.
snippet here
Answer the question
In order to leave comments, you need to log in
ul.list {
margin: 0;
padding: 0;
list-style-type: none;
counter-reset: list-counter;
li {
position: relative;
padding-left: 30px;
&::before {
counter-increment: list-counter;
content: counters(list-counter,".") " ";
position: absolute;
left: 0;
top: 5px;
display: block;
font-size: 12px;
}
}
}
Through &:before or &:after, through background-image and absolute attach to li, and indent text in li
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question