【发布时间】:2015-03-09 11:40:25
【问题描述】:
我需要一些帮助来设置我的标题样式。我在css counter-increment unwanted reset when skipping :before 有一个关于 css 计数器增量的问题,我让计数器工作,现在我的问题是样式,我希望它是这样的。
1.a 标题 1
10.a 标题 2
div.first:before
{
width: auto;
display: inline-block;
content: '1.a.\00a0';
}
div.second:before
{
width: auto;
display: inline-block;
content: '10.a.\00a0';
}
div.first {
}
div.second {
}
h4.counter {
}
<div class="first">
<h4 class="counter">foo</h4>
</div>
<div class="second">
<h4 class="counter">foo</h4>
</div>
【问题讨论】:
-
嘿@Sanna Widell,尝试为
h4标签添加样式!