2
我有一個列表,每個編號都是風格的。你應該關注的是數字的背景。現在它將採取數字的形式。如何使這個背景更圓,最好是一個很好的光滑的圓圈?這是我的Fiddle。編號的圓形背景
CSS:
.rounded-list a:before {
content: counter(li);
counter-increment: li;
position: relative;
left: -1em;
top: 64%;
margin-top: -1.3em;
background: rgba(255, 168, 76, 0.5);
height: 2em;
width: 2em;
line-height: 2em;
border: .3em solid #fff;
text-align: center;
font-weight: bold;
border-radius: 2em;
transition: all .3s ease-out;
}
雅各感謝。這創造了一個圓圈。但是,它會使文本更改行,而不是將'li'的所有文本保留在同一行中。運行小提琴時沒有得到那個結果嗎?我需要文字不改變行。 – gsamaras
@gsamaras更新 –
@gsamaras大聲笑,我不反對:P很高興我可以幫助:) –