【发布时间】:2012-02-10 10:52:01
【问题描述】:
我正在尝试设置有序列表的样式(无点,带半径的边框并旋转 45°)
<div class="test">
<ol>
<li><span>it's a test</span></li>
<li><span>and again</span></li>
</ol>
</div>
还有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);
}
给我that
这是我在这里阻止...如何旋转边框而不旋转里面的数字?如何在 css 中设置伪元素内容的样式?
感谢您的建议:)
【问题讨论】:
标签: css html-lists pseudo-element