" tag pair; 3. External style Table, write the style code in a separate ".css" file, referenced using the "" tag"/> " tag pair; 3. External style Table, write the style code in a separate ".css" file, referenced using the "" tag">
Home > Article > Web Front-end > What are the types of CSS layer style sheets?
## The operating environment of this tutorial: Windows 7 system, CSS3 version, Dell G3 computer. CSS, Cascading Style Sheets, is a computer language used to express file styles such as HTML or XML. CSS styles mainly include the following three types:There are three types of CSS layer style sheets: 1. Inline style sheet, which uses the style attribute to write the style in the HTML tag; 2. Internal style sheet, which writes the style code in the "c9ccee2e6ea535a969eb3f532ad9fe89" tag Centering; 3. External style sheet, write the style code in a separate ".css" file, use the "2cdf5bf648cf2f33323966d7f58a7f3f" tag to reference
1. Inline style sheet (inline style)
Use the style attribute to write the style in the HTML tag.<标签 style="属性:属性值;属性:属性值;"></标签>Such as the following code:
<p style="color:red;font-size:12px">这里文字是红色。</p>
2. Internal style sheet:
Write the style code on the pagec9ccee2e6ea535a969eb3f532ad9fe89...< ;/style> tagExample:<style type="text/css"> body { background-color: #F5F5F5; color: #555; font-size: 1.1em; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; } </style>c9ccee2e6ea535a969eb3f532ad9fe89...531ac245ce3e4fe3d50054a55f265927 tag structure can be located anywhere in the page6a74014ee44f5deb5894267f99b68016 tag, also Can appear multiple times. Usually the entire c9ccee2e6ea535a969eb3f532ad9fe89...531ac245ce3e4fe3d50054a55f265927 structure is written in the 93f0f5c25f18dab9d176bd4f6de5d30e...9c3bca370b5104690d9ef395f2c5f8d1 section of the page. The characteristic of this way of introducing CSS is that the CSS code of each page may be unified and planned. It is easy to reuse and maintain within a page, but the reuse of CSS code between multiple pages is still not enough. [Recommended tutorial:
CSS video tutorial]
3. External style sheet (.css file):
css The code is written in a separate external file. This css style file has a ".css" extension. Use the 2cdf5bf648cf2f33323966d7f58a7f3f tag within the 93f0f5c25f18dab9d176bd4f6de5d30e (not within the c9ccee2e6ea535a969eb3f532ad9fe89 tag) to link the css style file to In the HTML file, the following code is as follows:<link href="base.css" rel="stylesheet" type="text/css" />
Programming Video! !
The above is the detailed content of What are the types of CSS layer style sheets?. For more information, please follow other related articles on the PHP Chinese website!