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;}
new file
<!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>
Preview
Clear
- Course Recommendations
- Courseware download
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning
Let's briefly talk about starting a business in PHP
Quick introduction to web front-end development
Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things
Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]
Login verification and classic message board
Computer network knowledge collection
Quick Start Node.JS Full Version
The front-end course that understands you best: HTML5/CSS3/ES6/NPM/Vue/...[Original]
Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance)
















