搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
CSS 教程
CSS 基础教程
源代码
清空
点击运行
<!DOCTYPE html> <html> <head> <style> body { counter-reset: section; } h1 { counter-reset: subsection; } h1::before { counter-increment: section; content: "Section " counter(section) ". "; } h2::before { counter-increment: subsection; content: counter(section) "." counter(subsection) " "; } </style> </head> <body> <h1>Java tutorials:</h1> <h2>Core Java tutorial</h2> <h2>Servlet tutorial</h2> <h2>JSP tutorial</h2> <h2>Spring tutorial</h2> <h2>Hibernate tutorial</h2> <h1>Web technology tutorials:</h1> <h2>HTML tutorial</h2> <h2>CSS tutorial</h2> <h2>jQuery tutorial</h2> <h2>Bootstrap tutorial</h2> <h1>Database tutorials:</h1> <h2>SQL tutorial</h2> <h2>MySQL tutorial</h2> <h2>PL/SQL tutorial</h2> <h2>Oracle tutorial</h2> <p><strong>Note:</strong> 只有在指定了!DOCTYPE的情况下,IE8才支持这些属性。</p> </body> </html>
运行结果