ol
要素の先頭番号のデザインを変更する画像は使いません。
<ol class="custom-counter">
<li>This is the first item</li>
<li>This is the second item</li>
<li>This is the third item</li>
<li>This is the fourth item</li>
<li>This is the fifth item</li>
<li>This is the sixth item</li>
</ol>
.custom-counter {
margin-left: 0;
padding-right: 0;
list-style-type: none;
}
.custom-counter li {
counter-increment: step-counter;
}
.custom-counter li::before {
content: counter(step-counter);
margin-right: 5px;
font-size: 80%;
background-color: rgb(200,200,200);
color: white;
font-weight: bold;
padding: 3px 8px;
border-radius: 3px;
}
<ol class="custom-counter2">
<li>This is the first item</li>
<li>This is the second item</li>
<li>This is the third item</li>
<li>This is the fourth item</li>
<li>This is the fifth item</li>
<li>This is the sixth item</li>
</ol>
.custom-counter2 {
margin-left: 0;
padding-right: 0;
list-style-type: none;
}
.custom-counter2 li {
counter-increment: step-counter;
padding-bottom: 5px;
}
.custom-counter2 li::before {
content: counter(step-counter);
margin-right: 5px;
font-size: 80%;
background-color: red;
color: white;
font-weight: bold;
padding: 3px 9px;
border-radius: 18px;
}