The difference between the two is really an old question. But to this day, because of various network misinformation and some irresponsible books mistakenly, there are still quite a lot of people confuse pseudo-class with pseudo-elements, even many CSS veteran. Early in the beginning of the entry, I myself was deeply misled, because the forum most of the posts do not care about the nuances of this concept,
CSS class selector (4) and css class selectorI. class selector
Class selection uses "." (English dot) for identification, followed by the class name
For example:
.red{color:red;}
CSS pseudo-elements and pseudo-classes may be confusing for students who just learn CSS, as the official documentation explains: CSS pseudo-classes are used to add special effects to certain selectors, and CSS pseudo-elements are used to add special effects to certain selectors. So, what is the difference between a
Css pseudo-class, pseudo-element, and css pseudo-class Element
The pseudo class acts on the entire element, for example:
A: link {color: #111 ;}
A: hover {color: #222 ;}
Div: first-child {color: #333 ;}
Although none of these conditions are based on Dom, none of the Results
The difference between the two is really an old question. But to this day, because of various network misinformation and some irresponsible books mistakenly, there are still quite a lot of people confuse pseudo-class with pseudo-elements, even many CSS veteran. Early in the beginning of the entry, I myself was deeply misled, because the forum most of the posts do not care about the nuances of this concept,
The difference between the two is really an old question. But to this day, because of various network misinformation and some irresponsible books mistakenly, there are still quite a lot of people confuse pseudo-class with pseudo-elements, even many CSS veteran. Early in the beginning of the entry, I myself was deeply misled, because the forum most of the posts do not care about the nuances of this concept,
You cannot name a CSS class at the beginning of a number
Please do not use the Arabic 1, 2, 3, 4 to name the CSS pseudo class, or it will cause the browser can not explain the interpretation of the number at the beginning of the CSS cla
CSS pseudo-element, pseudo-class selector, and css pseudo-element Selector
A pseudo-class selector is a defined selector in CSS. It cannot be named by anyone. Common taste buds selector is used on Element a, such as a: link a: visited: hover a: active
The pseudo element sele
css| Specification | Web page
Web developers (that is, you) can identify the div and other page elements and tags by creating CSS classes and ID names and using those names. For developers, when naming CSS selectors for redefining XHTML tags (tags), you must ensure that they match exactly the predefined tags, but in terms of
Some interesting CSS questions (10) -- structural pseudo-class selector and css Selector
Start this series and talk about some interestingCSSQuestions and question types are not empty. What to think of is not only to broaden the problem-solving ideas, but also to involve CSS details that are easy to ignore.
Compatibili
There are also differences between the various CSS selectors and the introduction of style sheets. import a style sheet to introduce some pseudo-class selectors and import selectors.
(1) CSS selector:
1. Tag Selector:Select the tag directly using the HTML Tag Name
2. class selector:The. selector name {} is
Article Introduction: the class name intersection compound selector using CSS.
First look at the basic definition:
A composite selector is a selector of two or more basic selectors that are connected in different ways, mainly including the intersection selector, the and set selector, and the descendant selector.
Intersection Selector
The intersection compound selector is composed of two sele
(a) CSS selector:
1. Tag Selector: Select the tag directly from the HTML tag name
2. Class Selector: Select the label with the class attribute added by the name {} of the. Selector
3.ID selector: Select the tag with the id attribute added by the # selector name {}, which is the only one in the HTML document
4. Universal selector: Select all the tags in the HTML
Common naming conventions for CSS class, ID, and CSS file names(i) Common CSS naming conventionsHead: HeaderContent: Content/containerTail: FooterNavigation: NavSidebar: SidebarColumn: ColumnPage perimeter control overall layout width: WrapperMiddle: Left Right centerLogin Strip: LoginbarLogo: LogoAd: BannerPage body:
In css, the class selector adds a dot before the class name. If a class is not followed by multiple dots. important. urgent. Next I will introduce the usage of CSS class selectors and multi-cl
[Conversion] CSS target pseudo Class E: target, cssCSS3 target pseudo class has to talk about those things (only CSS achieves tab switching)
Do you think target is a little familiar ?!
What I want to talk about todayNoThe
The target pseudo class is a new property of css3.
W
Pseudo-Class in 1.CSS
CSS pseudo-classes are used to add special effects to certain selectors.
Grammar:selectorpseudo-class{property: value}CSS classes can also be used in conjunction with pseudo-classesselector.class: pseudo-
Use the css class name intersection compound selector "Turn", css "Turn"
A compound selector is a set of two or more basic selectors that are connected in different ways, including the intersection selector, Union selector, and descendant selector.
Intersection Selector
The intersection compound selector is composed of two selectors connected directly. The resu
Please note that some CSS pseudo class properties are not supported by all browsers, but there are four pseudo classes that can be safely used on links Pseudo class like the latch that specifies the selector State or association selector. They are in the form of: SELECTOR:PSEUDONBSP;CLASSNBSP;{NBSP;PROPERTY:NBSP;VALUE;NBSP, which uses a colon between the selecto
CSS pseudo-class before and after applications, css pseudo-beforeafter
I have seen some articles and examples about pseudo classes recently, but I am not very impressed. I have made some achievements in my project today.
There is a horizontal line in the text twice.
1. Partial page layout
Div-> span-> Chinese characters (small apartment)
2. The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.