This article introduces the content of the CSS simple learning points, has a certain reference value, now share to everyone, the need for friends can refer to
Reference: HTTP://WWW.W3SCHOOL.COM.CN/CSS
CSS is to let HTML elements display a more standardized thing, can be written in the tag, file header, file, browser default settings (level from high to low), can be unified specification.
Element {property: Value}
h1 {color:red; font-size:14px;}
Defines the color of text within the H1 element as red, while setting the font size to 14 pixels
The CSS is not sensitive to casing. However, there is one exception: class and ID names are sensitive to capitalization if they involve working with HTML documents.
You can group selectors so that the grouped selectors can share the same claims.
H1,h2,h3,h4,h5,h6 { color:green; }
All the caption elements are green.
The ID selector is defined as "#"
#red {color:red;} #green {color:green;}
The first one can define the color of the element to be red, the second defines the color of the element as Green
<p id= "Red" > This paragraph is red. </p><p id= "Green" > This paragraph is greenish. </p>
The id attribute can only appear once in each HTML document
Derived selectors: defining styles by context
ID selector: Specific ID defined style with #
Class selector:. Class name
Property selector: Define a style for the specified property
External style sheet: