[Switch] CSS target pseudo Class E: target CSS3 target pseudo class has to talk about those things (implement tab switching with pure CSS)
Do you think target is a little familiar ?!
What I want to talk about todayNoThe HTML tag has a target attribute.
The target pseudo class is a new property of css3.
When it comes to pseudo classes, people who have css attributes must know hover, link, visited, and focus. The usage of target is exactly the same as that of them.
Official definition:
The URL is followed by an anchor name #, pointing to a specific element in the document. The linked element is the target element ).
: Target selector can be used to select the target element of the current activity.
If this is the first time you see this definition, is it a bit confusing ?! It doesn't matter ~ Programmers must use code to communicate with each other. For example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
"#news1" > Jump to content 1
"#news2" > Jump to content 2
"news1" >Content 1...
"news2" >Content 2...
|
Is there no feel after reading the code ?~ That's all right. Let's take a look.
The initialization is like this:
When I click "Jump to content 1", it becomes like this:
What is the difference between feel and target and other pseudo classes ?!
Haha ~ Come on, go to the topic you want to talk about !!!
By using the features of target, you can switch the tab Effect of pure css.
By using the features of target, you can switch the tab Effect of pure css.
By using the features of target, you can switch the tab Effect of pure css.
(Three important things !)