Home  >  Article  >  Web Front-end  >  What is the meaning of css cascading style sheets

What is the meaning of css cascading style sheets

王林
王林Original
2021-03-04 15:58:174860browse

The meaning of css cascading style sheet: css cascading style sheet is a computer language used to express file styles such as HTML or XML. CSS can not only statically modify web pages, but can also cooperate with various scripting languages ​​to dynamically format various elements of web pages.

What is the meaning of css cascading style sheets

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

The meaning of css cascading style sheets:

Cascading style sheets are used to express HTML (an application of Standard Generalized Markup Language) or XML (a subset of Standard Generalized Markup Language) Computer language for file formats. CSS can not only statically modify web pages, but can also cooperate with various scripting languages ​​to dynamically format various elements of web pages.

CSS can perform pixel-level precise control over the layout of element positions in web pages, supports almost all font size styles, and has the ability to edit web page objects and model styles.

Its features:

1. Rich style definition

CSS provides a rich document style appearance, as well as the ability to set text and background attributes; allows for any element Create borders, as well as the distance between the element border and other elements, as well as the distance between the element border and the element content; allow you to freely change the capitalization, decoration, and other page effects of text.

2. Easy to use and modify

CSS can define the style in the style attribute of the HTML element, you can also define it in the header part of the HTML document, or you can declare the style in a Special CSS files for reference in HTML pages. In short, CSS style sheets can store and manage all style declarations in a unified manner.

In addition, elements of the same style can be classified and defined using the same style, you can also apply a certain style to all HTML tags with the same name, or you can assign a CSS style to a certain in page elements. If we want to modify the style, we only need to find the corresponding style statement in the style list and modify it.

3. Multi-page application

CSS style sheet can be stored in a separate CSS file, so that we can use the same CSS style sheet in multiple pages. Theoretically, CSS style sheets do not belong to any page file and can be referenced in any page file. In this way, the styles of multiple pages can be unified.

(Learning video sharing: css video tutorial)

4. Cascading

Simply put, cascading is to set the same element multiple times Style, this will use the last property value set. For example, if you use the same set of CSS style sheets for multiple pages in a site, and if you want to use other styles for some elements in some pages, you can define a separate style sheet for these styles and apply them to the page. These styles defined later will override the previous style settings, and what you see in the browser will be the style effect set last.

5. Page compression

In websites that use HTML to define page effects, a large number or repeated tables and font elements are often required to form text styles of various specifications. The consequence of this is that Generates a large number of HTML tags, thereby increasing the page file size. Putting the style declaration separately in the CSS style sheet can greatly reduce the size of the page, so the time spent loading the page will also be greatly reduced. In addition, the reuse of CSS style sheets reduces the size of the page to a greater extent and reduces the download time. [8]

Related recommendations:CSS tutorial

The above is the detailed content of What is the meaning of css cascading style sheets. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn