我有一个由第三个用户创建的标记。我必须根据设计应用一些基本样式来标记。
这是标记:
body{
color: rgba(42, 39, 52, 1);
font-size: 18px;
}
ul, ol {
margin: 0 0 20px 0;
}
ul, ol {
padding-left: 30px;
list-style-position: inside;
}
<ol>
<li>This is Photoshop's version of Lorem Ipsum and numeric list</li>
<li>This is Photoshop's version of Lorem Ipsum and numeric list</li>
<li>This is Photoshop's version of Lorem Ipsum and numeric list</li>
<li>This is Photoshop's version of Lorem Ipsum and numeric list</li>
</ol>
我正在尝试将不同的字体大小应用于列表项的编号和文本本身。我有标记可以吗?
提前致谢
答案 0 :(得分:1)
如果您尝试为数字设置不同的尺寸,请尝试http://jsfiddle.net/efe1n7we/
ol {
list-style-type: none;
counter-reset: ol-counter;
}
ol li:before {
font-size:50px;
content: counter(ol-counter);
counter-increment: ol-counter;
}