Css: first-child pseudo class selector usage introduction, first-child Selector
Css: first-child pseudo class selector usage:This selector can match the first element in the element set.: The first-child pseudo-class
different unique elements .The ID is recommended only if the target element is very unique and will never be used elsewhere on the site for this name. In other words, you should use the ID only if you are absolutely sure that the element will only occur once, if you think you might want similar elements later, just use the class. The final summary differences are as follows:First: Within the same page, ID objects with the same name are not allowed to appear, but class with the same name is allo
CSS hack technology is the use of different browsers different versions of the CSS implementation of the characteristics of the differences to meet the effect we need: in all major browsers display a unified effect, or for a specific browser to display a specific effect.
As we all know, if there are two attributes with the same name in a CSS style
; No content in}//divTest2.html:Jin ——— li Shangyin The 50-chord, one-chord-one-pillar-si-hua year. Butterfly Dream Fan Butterfly, hope Emperor hath the cuckoo. The Pearl of the Sea Moon has tears, Lantian day warm jade smoke. Is this a remembrance? It was only then that it was disconsolate. STYLE2.CSS:/*:root{background:red;} *//*li:first-child{background:red;} *//*ul>li:first-child{color:red;} *//*p:first-child{color:red;} *//*td:last-child{color:re
. It can be solved by using "+" In css. We can see that I have successfully drawn the second p to red below.
1
4. Attribute Selector
If you have played jquery, I think this attribute selector is very clear. First, let's take a look at the example. I want to find the p element of name = test and mark it in red.
1
So far, have you ever felt the same way as jque
In CSS, the class selector is displayed with a dot number:
. Center {Text-align:center}In the example above, all HTML elements that have the center class are centered.
In the following HTML code, both the H1 and P elements have the center class. This means that both will adhere to the rules in the. Center selector.
*****************************ID SelectorThe
. (This is self-understanding, unofficial explanation).
Language pseudo-Class selector:E:lang (language): Selects all elements that match E, and the matching element has the lang attribute, and its value is language.There are two ways to set up a document language. First, if you use HTML5, you can set this:or manually specify in the document:lang= "fr">
UI element State pseudo-class selector:E:checked: Matches a selected check button or radio button FORM elementE:enabled: Match all enabled
CSS: id selector, cssid Selector
This article describes the basic usage of the id selector in css: setting attributes for a specific TAG content.
Code organized from w3school: http://www.w3school.com.cn
:
Css pseudo-class selector creates a login box form, Selector
When a pseudo-class selector is used to make the mouse hover, the text box appears orange dotted line border. When the mouse is activated, the background color becomes pale orange.
Use css to create a rectangle wi
Descendants are selected with spaces, such as a b{border:1px solid red;}A descendant selector, such as a>b{border:1px solid red;}But if you think about it, these two concepts are not a duplicate of the place,are descendants also descendants?are descendants not descendants?The relationship between the two is not discussed, so let's see what's different in CSS.First on the code:Descendant selector:Descendant selector:It can be said that the difference i
The selector (selector) is a very important concept in CSS, and the markup styles in all HTML languages are controlled by different CSS selectors. Users only need to choose different HTML tags to choose, and give a variety of style declarations, you can achieve a variety of effects.CSS selectors include: Tag
+ Left padding + content + right padding + right Border + right edgeProperties of the CSS box model :Content properties: Wide =width high =heightInner padding attribute (distance between content and border): paddingMargin properties: Margin (note browser compatibility when using this property)Rules for inner padding and boundaries:If there are four parameters: the upper right or lower left, you can specify a direction aloneIf there is only one argume
Hack List (all tested by the author, in standard mode, hybrid mode is rarely used, so it is not tested ):The pink part is the property hack, and the yellow part is the selector hack, which can be used in combination. In addition, Firefox and Chrome also have their proprietary hack.Example:Firefox:@-Moz-document url-prefix ()/* when writing the outer part of the selector
CSS: class selector, cssclass Selector
This article describes the basic usage of class selectors in css: setting attributes for tags of the same type.
Code organized from w3school: http://www.w3school.com.cn
:
What is a CSS selector? The CSS selector is the tag that specifies the CSS to function, and the name of the tag is the selector. means: Select which container. Elements in an HTML page are controlled by a
Hello everybody, I am Xiao Qiang teacher, now online css+div video, either speak too deep, or too shallow, a lot of beginners students always encounter difficulties, today, Xiao Qiang teacher dedicated to everyone to prepare a video of the CSS course. Take you from the Zero Basic learning css+div until you can independently complete the front page production.Xiao
Town Field Poem:The Pure Heart sentiment wisdom language, does not have the world name and the benefit. Learn water under the hundred rivers, give up arrogant slow meaning.Learn to have a small return to feed root, willing to cast a conscience blog. Sincere in this writing experience, willing to see the text to inspire.——————————————————————————————————————————CodeResult——————————————————————————————————————————The essence of the blog, in the technical part, more in the town yard a poem. Editor
This article is written in notes form.1, CSS class selector detailedHttp://www.w3school.com.cn/css/css_selector_class.aspKnowledge Points:(1) The premise of using class selector is to add a class attribute to the tag, such as (2) The syntax of the class selector is: *.import
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.