Home > Article > Web Front-end > How to use css3 icon attribute?
The icon attribute of CSS3 is used to provide creators with the ability to set elements to the equivalent of icons.
CSS3 icon attribute
Function: icon attribute is provided for creators Added the ability to set elements to their icon equivalents.
Syntax:
icon: auto|URL;
auto: Use the default universal icon provided by the browser.
URL: Reference one or more icons in the list, separated by commas.
Note:
1. Unless the value of the "content" attribute is set to "icon", the element's icon will not be used.
2. Currently, no mainstream browser supports the icon attribute.
Example of usage of CSS3 icon attribute
Set image elements to their iconized equivalents:
img { content:icon; icon:url(imgicon.png); }
That’s it The entire content of this article, I hope it will be helpful to everyone's study.
The above is the detailed content of How to use css3 icon attribute?. For more information, please follow other related articles on the PHP Chinese website!