CSS计数器counter-increment父子连续普照与递增测试实例页面
回到相关文章 »代码:
CSS代码:
.counter { counter-reset: wangxiaoer 2; counter-increment: wangxiaoer; font-size: 24px; font-family: arial black; color: #cd0000; } .counter:before { content: counter(wangxiaoer); counter-increment: wangxiaoer; }
HTML代码:
<strong>我叫王小二,万万没想到,下面要出现的数字是:</strong> <p class="counter"></p> <strong><img src="26.gif" align="absmiddle">直接变成小四了,岳父会不会找我麻烦?</strong>
效果:
我叫王小二,万万没想到,下面要出现的数字是:
直接变成小四了,岳父会不会找我麻烦?