IT. Expert System.

CSS

counter()


Description

The counter() function is used to refer to the value of a counter (see counter-increment and counter-reset properties).

This function has the form:

counter(identifier)

or

counter(identifier,
list-style-type)

Note: In CSS 2.1, the value of a counter can only be referred to from the content CSS property.

Arguments

Name Description
identifier Specifies the URL to represent. The URL can be quoted with either two single quote (') or double quote (") characters
list-style-type (optional) Specifies the type. Default = decimal

Examples

This example shows how to add a counter to the beginning of each h1 element:

body {
  /* Set counter to 0 */
  counter-reset: section;
}

h1:before {
  /* Increment the counter */
  counter-increment: section;

  /* Display the counter */
  content: "Section "
    counter(section) ": ";
}

Browser Support

Chrome Firefox IE Safari Opera

Miscellaneous Information

Defined In: CSS2.1


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2795 / . Delta: 0.02068 с