Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the practices of css definition declaration

Shulou Source: shulou.com Published: 2022-06-01 04:04:39 09月12日 Update

This article mainly introduces the practice of the css definition statement, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

If you want to define more than one declaration, you need to gobble up each name with a semicolon. The above example shows how to define a middle paragraph in red calligraphy. It is not important to add a semicolon at the end of a rule, because a semicolon is a separator in English, not a closing mark. However, most experienced managers will add a semicolon to each reputation, and the advantage of this is that when you add or subtract statements from existing rules, you will try your best to reduce the likelihood of depravity. It's like what:

P {text-align:center; color:red;}

You should characterize only one attribute per line to enhance the readability of the format definition, like what:

P {text-align: center; color: black; font-family: arial;} spaces and uppercase

Most style sheets contain more than one rule, while most delineation rules sweep more than one declaration. The application of multiple declarations and spaces makes the stylesheet easier to edit:

Body {color: # 000; bac kg round: # fff; margin: 0; padding: 0; font-family: Georgia, Palatino, serif;}

The ability to collect spaces will not affect the task attainments of CSS in the browser. Unlike XHTML, CSS is insensitive to uppercase. However, there is one exception: when it comes to working with HTML documents, class and id are commonly said to be slow to uppercase.

Thank you for reading this article carefully. I hope the article "what are the practices of css definition statement" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Semicolons articles spaces practices fame capitalization big mark style different important slow case value task example interest one readable at the same time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Huawei MariaDB macOS Apple