Home  >  Article  >  Web Front-end  >  How to use css3 icon attribute?

How to use css3 icon attribute?

青灯夜游
青灯夜游Original
2019-02-20 11:46:304052browse

The icon attribute of CSS3 is used to provide creators with the ability to set elements to the equivalent of icons.

How to use css3 icon attribute?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn