CSS3 understand...LOGIN

CSS3 understands pseudo-class selectors

A brief introduction to CSS3 pseudo-class selectors:
Before the rise of standard browsers, many beginners may be unfamiliar with pseudo-class selectors, but for The :link, :focus and :hover selectors will be familiar to you because they are often used to set link state styles. In fact, they are pseudo-class selectors.
Basic syntax of pseudo-class selector:

  selector:pseudo-class{
  property:value;
}

Structural analysis:
1.selector: other css selectors.
2.:pseudo-class: pseudo-class selector.
3.property:value: Corresponding style attribute and value.

The code example is as follows:

a:link{color:red;}
a.title:link{color:blue;}



Next Section
<!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> #div1 :target p{ color: red; }; </style> </head> <body> <div id="div1"> i am div1 <div id="div2"> i am div2 <p>pppp</p> </div> </div> <a href="#div2">click me</a> </body> </html>
submitReset Code
ChapterCourseware