Css 2, css
1. font combination
Font: font-style font-variant font-weight font-size/line-height font-family
Font: style deformation and bold font size/row-height font family
Style deformation bold can be written in any order. If it is normal, it can be left empty.
Deformation font-variantThree values: small-caps normal inherit
Small-caps is a small capital letter.
Style font-styleFour values: italic oblique normal inherit
Italic is a specialized design of italic in the font family, while oblique is used to skew the text image.
Bold font-weightEveryone is familiar with this. 400 is normal. 700 is bold.
The row height can also be left empty
However, the font size and font family must be written in sequence as required.
Simplest form
Font: font family;
The most common form
Font: bold font size/line font family;
2. Background co-Writing
The context combination can be any attribute in any order (the only restriction is that bg-position. If there are two values that must be placed together, first x and then y)
Background: bg-color bg-image bg-repeat bg-position bg-attachment
Background: background color background image address duplicate direction background location background Association
Repetition direction
Repeat-x repeat-y no-repeat inherit
Background
Background Association
Scroll fixed inherit is generally a common type of scroll. fixed follows the body background.
The most common form
Background: url(bgimage.gif) x y no-repeat;
Background: whether or not the referenced path location is repeated
3. Build a policy
Progressive enhancement and graceful degradation
Two website construction strategies
Progressive enhancement of progressive enhancement: implements basic functions for lower-version browsers, and then beautifies and enhances later-version browsers. This policy is generally used on PCs (there are still many earlier-version browsers on PCs)
Graceful degradation of graceful degradation: first, the most complete functions are implemented for High-version browsers, and then patches for low-version browsers. This policy is generally used on mobile terminals (mobile browsers are generally relatively new)
Incremental enhancement and graceful degradation are only different strategies, and the final result may be the same