Simple CSS Selector-Hierarchy Selector
* CSS level selector has 4
* 1. Descendant selector: $ (' div p '), in all descendants (descendants) of the ancestor element, query the specified element
* 2. Child element
First, the basic composition of CSS
Selector {property: Property value}
The CSS statement is composed of the above three parts selector written in the curly braces, the curly braces for the declaration, if there are more than one declaration, attributes will be separated by ";" First, let's cite an example:
Body
{
Back
Html5 css selector well number, difference between periods, html5 Selector
I. Understand the style composition of CSSStyle sheets in CSS are composed of rules. Each rule consists of three parts:1. selector (for example, "body" in the following example) to tell the browser wh
Transferred from: http://www.365mini.com/page/css-hack-ie-chrome-firefox-safari-opera.htmIn the current network era, a variety of web pages to show us a rich and colorful web world, and the browser is our view of the Network World window. In the past, browsers mainly have IE and Netscape two, and now, a variety of powerful browser endless. For example: The world-famous browser has
)
:p Assword
Match
: Radio
Match
: RESET
Match
: Selected
Matches the selected
: Submit
Match
: Text
Match
: Visible
Matches all currently visible elements: the offsetwidth and offsetheight values of these elements are generally considered to be not 0, which is the opposite of ": hidden"
Note: Some of the selectors listed in the table accept paramete
Differences between class and ID selectorsLearning the class selector and ID selector, we will find that there are a lot of similarities between them, is not the two can be common? Let's not be anxious to summarize their similarities and differences in the first few years:same point: can be applied to any elementDifferent points:1.The ID selector can only be used
A Brief Introduction to the after pseudo object selector of css, cssafter pseudo Selector
A Brief Introduction to the after pseudo object selector of css:This section describes the usage of the after pseudo object selector, hoping to help you.Before this
Simple CSS Selector-General Selector
* CSS Regular selector has 5
* Tag Tag Selector: $ (' div '), select by Tag name, return collection
* ID Selector: $ (' #top '), based on element I
Original Author:Micron blog
I used to write an article about CSS hack.ArticleBut I recently looked back and found that my understanding was not profound enough and my summary was not concise. So I will try again today to write a new article. Common CSS
Hack is as follows (I only tested ie FF chrome ).
Hack list (all tested by the author and in standard mo
The CSS selector is powerful, and when different selector styles are set to conflict, the style is set with a high weight selector. Weight (ie, priority) rules like this, the higher the weight, the higher the priority:
The same element can use more than one rule to specify its same style (such as font color), and each
1. style sheet Cascading Style SheetCSS Benefits:
Separation of content from performance
Web page performance is unified, easy to modify
Rich styling to make Web page layouts more flexible
Reduce the amount of Web page code, increase the browsing speed of Web pages, save network bandwidth
Use Web-independent CSS to facilitate web pages to be indexed by search engines
Embed id> external id> embed class> external class> embe
In CSS, the class selector is displayed with a point number:
. Center {Text-align:center}
In the above example, all HTML elements that have the center class are centered.
In the following HTML code, the H1 and P elements all have the center class. This means that both will comply with the rules in the. Center selector.
*****************************
ID
CSS selector and css3 Selector
Original address:
Http://www.w3.org/TR/css3-selectors/
Test demo URL:
Http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/reports/implementreportTEMPLATE.html
Abstract
Selector is a matching mode in the tree structure, similar to the tech
The page, all the CSS code, needs to be written to the tag. The Type property of the style label should select Text/css, but the type attribute can be omitted. The CSS modifies all the labels on the page and must be selected with the help of a selector. Selector, you can wr
When using CSS or jquery to select elements. Very often we need to make a or | | Operation.jquery or CSS | | Operations are often used. Also very easy, is separated by commas.Selector1,selector2,selectornFor example, if we want to select a div or span, we can select the element that satisfies the condition by $ ("Div,span"). in CSS or jquery. Most of what I've
Css id selector (3) and cssid SelectorI. ID Selector
The ID selector uses the "#" prefix identifier for identification, followed by the ID name of the specified element.
For example
#box{ width:100px; height:100px;}
The element ID name is unique and can only correspond to a specific element in the document. In HTML, t
Css: nth-of-type () selector usage, nth-of-type Selector
I made a page today and accidentally saw thisnth-of-typeIt is quite convenient. Some of the previous single and double lines have horizontal lines, and some do not have horizontal lines. Generally, border-right: none and so on are separately written in html. Now we can quickly record this good thing.
: Nth-
, the parent element contains only one child element, and the child element matches E.11:e:only-of-type, the selection parent element contains only one child element of the same type, and the child element matches the E12:e:empty: Selects an element that has no child elements and does not contain a text node.
Negation pseudo-Class selector:E:not (f), matches all E elements except F.
Property selector:1.E[ATTR]: Select match E element with attr att
neighbor Sibling Selector adjacent brothers, which must be strictly adjacent , are not allowed to appear other element intervals -->through the sibling selector all siblings do not require strictly adjacent --> CSS Selector--adjacent, universal sibling selector
);
E:only-child: The only child element in the parent element e;
E:only-of-type: The only element e in the parent element that has that type;
E:empty: Elements with No child elements, no child elements including text nodes;
E:lang (en): an element with a language expressed in two-letter abbreviations (en);
E:not (Exception): This selector will select elements that do not match the selector in parenthes
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.