Breaking

Thursday, May 2, 2013

CSS counter-reset

counter-reset 2

Tạo hoặc reset một hoặc nhiều counter.

Thuộc tính giá trị Ví dụ Mô tả
counter-reset none    
id number    
inherit    

Xem ví dụ

<style>
#ttt {counter-reset:section;}
h1 {counter-reset:subsection;}
h1:before
{
counter-increment:section;
content:"Chương " counter(section) ". ";
}
h2:before
{
counter-increment:subsection;
content:counter(section) "." counter(subsection) " - ";
}
</style>

<div id="ttt">
<h1>HTML tutorials</h1>
<h2>HTML Tutorial</h2>
<h2>XHTML Tutorial</h2>
<h2>CSS Tutorial</h2>

<h1>Scripting tutorials</h1>
<h2>JavaScript</h2>
<h2>VBScript</h2>

<h1>XML tutorials</h1>
<h2>XML</h2>
<h2>XSL</h2>

</div>

HTML tutorials

HTML Tutorial

XHTML Tutorial

CSS Tutorial

Scripting tutorials

JavaScript

VBScript

XML tutorials

XML

XSL

Sự tương thích ( Cập nhật / Báo lỗi )

Firefox Opera Google Chrome Safari IOS Android Window phone
               

No comments:

Post a Comment