Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS3 icon property


May 05, 2021 CSS Reference Manual


Table of contents


CSS3 icon property


Set the image element to an iconized equivalent:

Img
{
content:icon;
icon:url(imgicon.png);
}


Browser support

CSS3 icon property CSS3 icon property CSS3 icon property CSS3 icon property CSS3 icon property

There is no mainstream browser that supports icon properties.


Description of property definition and use

The icon property gives the author the ability to set elements as icon equivalents.

Note: The icon of the element is not available unless the content property is set to icon!

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


Grammar

icon: auto| URL |inherit;

Value Describe
auto Use the default universal icon provided by the browser.
Url Refers to one or more icons in the list, which is separated by a comma.
inherit Specifies that the value of the icon property should be inherited from the element.