1, CSS is all called overlay style sheet, there are 4 ways to introduce in HTML
A, inline style <dic style= "color:red" ></div>
b, Embedded: write in
<style type= "Text/css" >
div{color:red;}
</style>
C, linked <link href= "path to CSS folder" >
D, import style @import URL (CSS path) (generally deprecated, because it is loaded last)
2. CSS Selector
Selector priority: ID selector >class selector > tag Selector
Weight level: Inline style > Inline > Linked type
CSS inheritance: Only font-related properties can be inherited, such as to a DIV set the effect of the font, as well as the height of the width, in the div add a P tag, then the P tag can inherit the div's font style, but can not inherit his width and height (there is a can be inherited, post-supplement, Can only be tested with DIV and P instances for the time being, not clear for other tags)
3. Use border to draw triangles:
The code is:
<style>
. sjx{width:0px;height:0px;
border-width:200px;
Border-style:solid;
Border-left-color: #039;
Border-right-color: #9C0;
Border-top-color: #906;
Border-bottom-color: #666;
Border-left-color:transparent;
Border-top-color:transparent;
Border-bottom-color:transparent;}
</style>
<div class= "SJX" ></div>
4, background commonly used 5 properties: url (image address)
Background-repeat:no-repeat
Background-attachment:fixed (Background map settings, and when the content fills the browser, the browser will automatically appear scroll bar, pull down the scroll bar, the background map to scroll together, this setting is to keep the background map fixed)
CSS (cascading style sheets) (1 hours)