CSS selector records
Selector
Example
Example description
CSS
.Class
. Intro
Select all the elements of class = "intro.
1
#Id
# Firstname
Select all the elements of id = "firstname.
1
*
*
Select all elements.
2
Element
P
Select all
CSS Common selectors: Tag Selector, class selector, id selector, derivation selector, sub selector, combo selector1: Tag Selector: If it is a declaration, you do not need a semicolon, a
This article mainly introduces the content related to the CSS selector priority to the coders. It analyzes and compares the CSS selector priority using eight small examples. For more information about the coders, see. This article will share with you the introduction of CSS
usagesThis ID selector can be used many times as a derived selector, even if the element labeled Sidebar only appears once in the document:#sidebar p{font-style:italic;text-align:right;margin-top:0.5em;} #sidebar h2 {font-size:1em;font-weight:normal;font-style:italic;margin:0;line-height:1.5;text-align:right;}In this case, unlike other p elements in the page, the P element in the sidebar is handled in a sp
First, CSS base selectorUniversal SelectorUniversal Selector-Universal selector, displayed as an asterisk (*)-can be matched with any element-often used to set default styles, such as setting the default font and size of text for an entire document650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7D/C7/wKiom1bvqMjTF2SuAACrInt1yGk336.png "title=" Web.png
border-left, is that clear?When the sweetness tastes, start to re-wash and learn a CSS selector!I divided the CSS selector into three sections, we learn in turn, the first part is that we are the basic selector; The second part is the property
selectors, completely ignored: focus. IE7 is supported on any element: hover, but ignored: active and: Focus. If you do not need to be compatible with IE6, IE7, it is very good.Finally, it is worth pointing out that by linking pseudo-classes together, you can create more complex behaviors, such as implementing different rollover effects on both visited and non-visited links. /* makes all visited links olive on hover */ {color: olive;} Universal sele
Google Chrome modified CSS and JS after synchronization saved to the file.English Original: http://www.stephensaw.me/google-chrome-devtools-source-maps/谷歌的Chrome DevTools源地图谷歌的Chrome DevTools发展得越来越好,尤其是他们快速的BlinkandV8的性能,而且他们使DevTools更好。最近我发现,编辑源代码的正确的方式是使用源映射了
of the selector is better to take some, the other is not very good to take, jquery in this piece is much better than it, provides a lot of access methods mainly include
1. Base selector (mainly including tag Selector, ID selector, class selector, universal
The CSS selector can accurately find the specified tag. Using the CSS selector allows us to easily define CSS styles for the tag, rather than defining CSS styles for each tag.
The following describes the five most common
CSS basics 5: class selector
I CSS class selector Overview
The class selector allows you to specify styles in a way independent of document elements. This selector can be used independently or in combination with other elements.
T
CSS Style Basics Learn1.CSS Basic SyntaxThe appearance of CSS style is to separate the content and performance greatly improve the work efficiencyinline style (inside HTML elements )Internal style sheet (inside the External style sheet (enables separation of content from presentation, recommended)Create an external style sheet file (*.
1. IntroductionThe last section, "CSS Know how much (5)-selector" Finally mentioned that too many selector types will cause some problems, what is the problem? Let's give a direct example. , the CSS of the two selectors are for The above is still relatively simple, the following in a complex: What color does the 2. D
]
The element that matches the value of the attribute attr that begins with value
E[attr $=value]
The element that matches the value of the Attr property to the end
E[attr *=value]
The value of the match attribute attr contains the element of value
Pseudo-Class selector (CSS tool. All evils incompatible)
E:first-child
Matches the firs
CSS syntaxselector{ Property:value } Example: h1{color:red; font-size:14px} property is greater than 1, the attributes are separated by a semicolon If the value is greater than 1 words, you need to enclose a quotation mark p{font-family: "Sans serif";} Selector grouping: h1,h2,h3,h4,h5,h6{color:red;} Inherited: body{ Color:green; } css-Derived selectorsDefin
CSS (i) Cascading style Sheet Cascading style sheetCSS Annotation Method/* * *First, the introduction of CSS methods1. Row style style= "key:value; " "width:100px;height:100px; Background:yellow; ">2. Page-level CSS is written in the head tag style tag inside the lines (not recommended) [email protected] URL () Introduction also written in the Style tag insi
9. Class of CSS and ID selectorThe difference between ID and class is that the same ID can only be used once for a page, and class can be unrestricted.Similarly, you can use a selector after the HTML selector to specify special HTML elements, such as the p.jam{value}, to act on the paragraph with the ' Jam ' class attribute.10. This is almost forgotten. Page layo
I. Overview of CSSCSS is cascading style sheets abbreviation, Chinese is called cascading style sheet, the rendering and layout of HTML tagsA CSS rule consists of two main parts: a selector, and one or more declarations.For exampleIi. four ways to introduce CSS1. In-lineInline is a CSS style that is set in the Style property of the tag. This approach does not ref
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
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.