我有一个Wordpress网站。我想将数字添加到" h2标签"
我想通过php(functions.php)
来做我的帖子格式:
text
<h2>text</h2>
text
<h2>text</h2>
text
<h2>text</h2>
...
...
我想要这个:
text
<h2>NUMBER-1 text</h2>
text
<h2>NUMBER-2 text</h2>
text
<h2>NUMBER-3 text</h2>
...
...
答案 0 :(得分:-1)
您可以使用带有样式属性的有序列表:
<ol type="N" style="font-weight: bold;font-size:20px">
<li><span style="font-weight: normal;font-size:10px">text</span></li>
<li><span style="font-weight: normal;font-size:10px">text</span></li>
<li><span style="font-weight: normal;font-size:10px">text</span></li>
</ol>
用css简化:
ol {font-weight:bold; font-size:20px;}
span {font-weight:normal; font-size:10px;}
<ol type="N">
<li><span>text</span></li>
<li><span>text</span></li>
<li><span>text</span></li>
</ol>