Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS3 icon property

CSS3 icon property

Example

Set an image element to its icon equivalent:

img

{

content:icon;

icon:url(imgicon.png);

}


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

No major browser supports the icon property.


Property definition and usage

The icon property gives authors the ability to set an element to its icon equivalent.

**Note:** An element's icon cannot be used unless the "content" property is set to "icon"!

Default value: auto
Inherited: no
Version: CSS3
JavaScript syntax: object.style.icon="url(image.png)"

Syntax

icon: auto|

URL

|inherit;

Value Description
auto Use the default generic icon provided by the browser.
URL References one or more icons from a comma-separated list.
inherit Specifies that the value of the icon property should be inherited from the element.