1. Introduction to CSS
CSS (cascading style Sheets) cascading style sheet, a computer language used to control the display of HTML content
CSS pre-defines a number of style properties related to the display effect, and the control of the style is very precise and fine, such as color, font-size, and so on. If you want HTML content to display an effect, apply the corresponding CSS style property
Features of CSS
Some style attribute sub-tags can inherit from the parent tag, while others cannot
A label can apply several style attributes at the same time
The final result of a label is a cascade (overlay) of a number of style attributes to form together
2. Five ways to use CSS
(1) inline style
Write in the element's style attribute
(2) inline style
Written within the <style> element
(3) import style
Use the @import URL (index.css) in the beginning of the <style> element and introduce it in a way that actually counts as an inline style
(4) link style
Use <link> elements to introduce CSS files, such as <link type= "Text/css" rel= "stylesheet" href= "C1.css"/>
(5) default Style
Each HTML tag has a default CSS style
3. CSS Priority
When a style attribute occurs multiple times, it is necessary to use precedence rules to resolve the resulting contradiction
(1) Priority of different ingestion methods: inline > inline, Import and link > default Styles
(2) In the introduction of the same introduction method or the same priority, the latter appears to cover the first
4. Other common style attributes
Visibility of Display control elements
Cursor controls the style when the mouse pointer enters the element
Introduction to CSS