CSS is the color of the page editing, is the rendering of its function.
Each element has a display property according to the specification, and each element has a------------such as a DIV element whose default is block.
Inline and block-level elements
Block-level elements occupy a rectangular area that can be set to a higher length and width, whereas the elements in the row are not. Block-level elements can nest inline elements, whereas inline elements do not.
Referencing CSS
Working with external style sheets
Use code to reference CSS, code <link rel= "stylesheet" herf= "Main.css" >
It enables code separation, ease of maintenance and use.
Using an internal style sheet
Write CSS in the HTML document, write in the head tag, the code is as follows <style type= "Text/css" > </style> This is more convenient, but it is difficult to share multiple pages, not easy to modify, Therefore, it is not recommended to use this internal style sheet.
Using inline style Sheets
Written directly in the start tag, and the internal style sheet are similar, not very recommended to use.
Comments for CSS
CSS in a rule with the format: selector {declaration block}
Element Selector------------tag name {declaration block}
Class selector---------------. class name {declaration block} class name itself, you need to include the class attribute in the start tag of the HTML tag
ID selector----------------#id值 {declaration block}
Combo/Set Selector------tag name 1, tag name 2{declaration block} tag name not limited
Pseudo class selector--------------for the A label a:link not accessed a:visited accessed a:hover mouse hover a:active Click {Declaration block}
Descendant selector--------------to sign its ancestor table before the descendant label after {declaration block}
The subset selector--------------the parent element in the previous descendant label after {declaration block}
Property selector (Input type= "text")
Format one: element name [property name + attribute value]{declaration block}
Format two: element name [attribute name + "up greater than sign =" + attribute value]{declaration block} Select label starting with attribute value
Format three: element name [attribute name + "&=" + attribute value]{declaration block} Select a label that ends with a property value
Format four: element name [attribute name + "*=" + attribute value]{declaration block} Select the property value of the tab
Small content and other content will be written on the following ...
Introduction to CSS Content (cascading style sheets)