I. Introduction of CSS
1, cascading style sheet: overlay effect, different CSS to the same HTML decoration, conflict parts, priority high effect, non-conflicting parts, common role
2. css function
(1) Modifying HTML
(2) Replace the label's own color, font size and other properties, improve the reusability of
(3) HTML content and style separation, facilitate post-maintenance
3. How to introduce CSS
(1) Inline style
<div style= "color:red;font-size:100" > Inline </div>
(2) Internal style (written in head)
<style type= "Text/css" >
DIV{COLOR:RED;FONT-SIZE:100}
INPUT{COLOR:RED;FONT-SIZE:100}
</style>
(3) Web global style
1. Create a CSS file
2. Type: div{color:red;font-size:200px}
3. Introduce the CSS file
<link ref= "stylesheet" href= "Cssdemo.css" type= "Text/css" >
(4) @import method
Basic No, reason lag in HTML loading CSS, does not support JS dynamic modification, some low IE version does not support
Summary:
Style: Tell the browser to use CSS to parse
The relationship between REF:CSS and HTML
The introduction is written in the head
The internal style is also written in the head.
CSS Cascading style Beginner