CSS (1), CSS (
1. CSS (Cascading Style Sheet) stacked Style sheets.
A markup language used to control webpage styles and allow separation of style information from webpage content.
2. CSS Introduction
1) Intra-row style
Add style directly behind the tag and set CSS attributes and attribute values <p> 2) inline style
Add <style = "type/css"> </style> to
3) Link (recommended)
<Link rel = "stylesheet" type = "text/css" href = "CSS/demo.css">
4) import a style (not required)
<Style> @ import url(1.css) </style>
3. CSS Selector
1) Tag Selector
P {font-size: 12px; background-color: #00 FFFF; color: # FF0033 ;}
2) category Selector
. DemoClass {font-size: 12px; background-color: #900; color: 090 ;}
3) ID Selector
# DemoID {font-size: 30px; background-color: # 0099FF; color: # FFFF00 ;}
Selector priority: ID selector> category selector> tag Selector
4. CSS text Effect
1) font: font-family
2) text size: font-size
3) text color: color
4) text width: font-weight
5) Text
Underline: text-decoration: underline;
Strikethrough: text-decoration: overline;
Fixed line: text-decoration: line-through;
6) uppercase/lowercase letters
Uppercase letters: text-transform: capitalize;
Uppercase words: text-transform: uppercase;
All lowercase words: text-transform: lowercase;
7) the default text spacing between letter and spacing is normal;
8) align
Horizontal center text-align: center;
9) line spacing line-height
Vertical center line-height: container height;
5. image effects
1) image border
Border type border-style dotted dashed dotted line solid line
Border color border-color
Border width border-width
2) text Mixing
Set float
3) Background
Background color: background-color
Background image: background-image
Repeated Images
Repeat in the horizontal direction: background-repeat: repeat-x;
Repeat background-repeat: repeat-y in the vertical direction;
Do not repeat background-repeat: no-repeat;
Image position: background-position
Fixed background image: background-attachment: fixed;