我正在尝试设置有序列表的样式(没有点,半径边框和旋转45°)
<div class="test">
<ol>
<li><span>it's a test</span></li>
<li><span>and again</span></li>
</ol>
</div>
Run Code Online (Sandbox Code Playgroud)
和CSS
.test ol {
counter-reset: li;
list-style-type: none;
}
.test ol > li {
position:relative;
list-style:none;
}
.test ol > li:before {
content:counter(li);
counter-increment:li;
position:absolute;
top:-2px;
left:-24px;
width:21px;
color:#E2202D;
font-weight:bold;
font-family:"Helvetica Neue", Arial, sans-serif;
text-align:center;
border: 1px dashed #E2202D;
-webkit-border-radius:6px;
border-radius:6px;
-webkit-transform: rotate(45deg);
}
Run Code Online (Sandbox Code Playgroud)
它给了我那个
这就是我在阻止......如何在不旋转数字的情况下旋转边框?如何在css中设置伪元素的内容?
谢谢你的建议:)