Heavyweight (CSS) laminated pattern table tutorial (transfer)

xiaoxiao2021-03-06  40

Heavyweight (CSS) laminated pattern table tutorial I

This article is an overview of CSS, and provides some examples to demonstrate how CSS work is to learn CSS more effective.

This article is not a reference or compatibility guide (although there are some very good references and compatibility annotations). If you are used to using CSS and want to learn more about more style sheets, we guarantee that you will find some very useful information in this article :).

● What can't do?

The stacked style sheet is often understood to achieve a means of achieving "content" and "style". In fact, this statement is not completely correct, because according to your definition of "style" and "content", the role of laminated style sheets is not the same.

HTML defines the structure of the document while organizing body and image and other information together with the tag (tags). CSS does not affect the structure of the document.

The laminated style sheet (CSS) is made to define what kind of layout of these elements, what color, spacing ... is displayed in the page, which can also affect the layout of the page content, but it is impossible to change the structure of the page. CSS can only be applied to the element (not universal) within a limited limit, and the structure of the document element is still defined by the marker language HTML.

● Is there any benefit using CSS?

All HTML tags (tags) have their own default style. That is, the browser explains and displays the content in each tag according to certain basic rules, but we pass inline style (inline style) You can prioritize the display style of the content on the default style of the browser. The browser default style sheet priority is the lowest. Inline style examples are as follows:

● Contains a style sheet

Each style sheet is a collection of style rules. You can define the style tag between ... of the content document, as follows: