Home > Web Front-end > HTML Tutorial > [Original] Reading Notes from 'DIV CSS Business Cases and Web Layout Development' (2)_html/css_WEB-ITnose

[Original] Reading Notes from 'DIV CSS Business Cases and Web Layout Development' (2)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:28:19
Original
914 people have browsed it

1. Basic CSS syntax: including 3 aspects, selector, attribute, and attribute value.

Selector { attribute : attribute value; }

Note:

1) Attributes must be included in {}.

2) Separate attributes and attribute values ​​with:.

3) When there are multiple attributes, use ; to distinguish them.

4) When writing attributes, using spaces, line breaks, etc. between attributes does not affect the display of the attributes.

5) An attribute has multiple attribute values, and each attribute value is separated by a space.

2. CSS calling methods:

Includes 3 types, interline calling (styles are defined directly in elements), internal calls (styles are defined in the page) and external calls (style files are written separately be called).

3. Interline call:

4. Internal call:

When called, depending on the content, The way of writing is different.

1)

2)

5. External call:

1) Use the link element to call

2) Use @improt to call