Use of the CSS3 counter-ground tornado

Source: Internet
Author: User

Combine:: Before to implement a custom list

Body
{
COUNTER-RESET:DNF;
}
Div::before
{
Content:counter (DNF) ".";
COUNTER-INCREMENT:DNF;
}
<body>
<div>dnf</div>
<div>dnf</div>
<div>dnf</div>
<div>dnf</div>
</body>
(1)
COUNTER-RESET:DNF will parse to the corresponding element execution, body only one, so only once
Reset, define DNF counter, default 0, can specify default value
COUNTER-RESET:DNF 10;
Multiple counters can be defined
COUNTER-RESET:DNF lol;

(2)

Content:counter (DNF) "."; /1
Counter-increment:dnf;//2
Regardless of whether the 2 statement precedes 1 or after 1, the default is increased by 1 each time you specify
COUNTER-INCREMENT:DNF 2;
1 statement displays numbers by default, and can be any value supported by other List-style-type properties
Content:counter (Dnf,lower-alpha) ".";
lowercase English Letter A,b,c,d

Use of the CSS3 counter-ground tornado

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.