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
NanyiDate: March 12, 2009Source: http://www.ruanyifeng.com/blog/2009/03/css_selectors.htmlLast year, when I was studying jquery, I used to make a few selector notes.These days took out to see a bit, found a lot of forgotten. So, I decided to post them here for easy viewing later. This should also be useful for other friends, after all, the selector is the first step in making a Web page effect.The notes are
Some of our program apes have some questions about how to apply styles to an element, such as a Div, and why the style I write in the back doesn't cover the previous style, not that CSS is a cascading style sheet? If you also encounter the same problem in development, that is, when you apply a style to an element (such as in an external style sheet), the style that is written on it cannot overwrite the previously defined style.At this point, you may h
Core Tip: What is a type selector? A character that is the name of an existing label type in a Web page. The body is a type of tag in a Web page, Div,p,span.
One, type selector
What is a type selector? A character that is the name of an existing label type in a Web page. The body is a type of tag in a Web page, Div,p,span.As follows:
Body {}div {}P {}span {}
Recently in the study of jquery selector, you know that jquery selectors and CSS selectors are very similar, so tidy up the CSS selector;CSS1-CSS3 offers a very rich selection of selectors, but because some selectors are not supported by individual browsers, many selectors are rarely used in real-world
From: http://www.cnblogs.com/webblog/archive/2009/08/07/1541005.htmlRecently in the study of jquery selector, you know that jquery selectors and CSS selectors are very similar, so tidy up the CSS selector;CSS1-CSS3 offers a very rich selection of selectors, but because some selectors are not supported by individual bro
('a[href*=". Com/el"] ') # [aclass="Sister"href="Http://example.com/elsie"Id="Link1">elsiea;]Here's what you need to explain:Soup.select (' a[href^= ' http://example.com/"]) means that the find HREF attribute value is a label that starts with the" http://example.com/"value, and you can view the blog introduction.Soup.select (' a[href$= ' Tillie "]) means that the lookup href attribute value is a label that ends with Tillie.Soup.select (' a[href*= '. Com/el "]) means that the string". Com/el "is
CSS operations have an important approach: CSS ()
CSS () has three different syntax to complete their work:
$ (selector). CSS (Name,value)$ (selector). css ({properties})$ (
Add a class to a P label, but some attributes in the class do not work after execution. The firebug check shows that the property that does not work is overwritten. At this time, I suddenly realized the priority issue of the CSS selector. Here I will summarize the priority issue of the CSS selector.
51cto recommended
Turn from: Http://www.cnblogs.com/polk6/archive/2013/07/19/3142142.htmlCSS selector and introduction of various style reference methodsA good interface, is a web to attract people's biggest selling point.CSS: Cascading Style sheets (Cascading style sheets), which defines how HTML elements are displayed.1. Classifier syntax structure for selectors:1.1 ID Selector 1.1.1 Format #id : The id;id of the #+ ele
This article mainly introduces the selection of CSS in the summary and efficiency comparison, including pseudo-class selectors and pseudo-element selectors, the need for friends can refer to the following
As we all know, CSS is additive (the same element is specified by multiple style rules), inheritance (descendant elements inherit some of the styles and attributes of the predecessor Element) and preceden
with a dot
The naming conventions for class names are the same as the naming conventions for ID names
The class name is the one that is designed to set the style for CSS.
Each label in HTML can be bound to multiple class names at the same timeFormat:
ID selector and class selector
What is the difference between ID and class?
Win:firefox 3.6
Support
Win:opera 10
Support
Win:ie6
does not support
Win:ie7
Support
Win:ie8
Support
Use of composite selectors
This is a simple tab menu:
The following is the HTML code:
1
2
3
4
5
6
In order to achieve the above effect, we c
As a web developer, it is also important to have the necessary foreground technology, especially when you encounter some practical problems. Here is an example for you: Adds a class to a P tag, but some of the attributes in that class do not work after execution. The Firebug view shows that the properties that are not working are overwritten. This time suddenly aware of the CSS selector priority problem, he
Different browsers (ie, Gecko, opera...) have different rendering methods for CSS, resulting in different display effects,Therefore, we can solve this problem by loading different CSS. The following describes the two methods,It is not necessarily very practical and difficult to play. Code in pure CSS Mode
. Box {width: 20em; Height: 20em; Background: #369;}/* --
)
Tag Selector "such as: h1", pseudo-elements "such as:: after" number (=C)
Ignore "*" Selector
Although pseudo-classes (such as: hover) participate in the calculation of CSS precedence, ":not" does not participate in calculations.
The precedence within the HTML style attribute is described in CSS2.1 (it does not directly participate in the calcul
Objective
CSS selector, is the front-end basic skills, as long as you are a front-end, this must be mastered! Today I want to revisit the CSS selector, mainly to review some of the CSS selector in the use of some common symbols,
) to locate the child element, which is the XPath The wording is very different, in fact, very good understanding, direct translation came to the first few childrenSix, CSS: Logical Operations1.css can also implement a logical operation, matching two properties, which is not the same as XPath, no need to write the and keywordSeven, CSS: Fuzzy Matching1.
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.