Css 2, css

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.