Home > Web Front-end > HTML Tutorial > DIV CSS中ID和CLASS_html/css_WEB-ITnose

DIV CSS中ID和CLASS_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:32:47
Original
892 people have browsed it

Let’s look at a piece of code first:

Hello Phoenix!

The id attribute is used. Corresponding to #top{} in CSS

Look at another piece of code:

The class attribute is used. Corresponding to .bottom a{} in CSS

According to the CSS2.0 manual, a is included in the pseudo-class. In the second example, the properties of the hyperlink a are controlled through CSS, and then the area is defined in a div. The class name corresponding to a.
Therefore, pay attention to the difference between id and class. The latter can only be used for calling css pseudo-classes.

Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template