How css defines more than one declaration
This article mainly introduces how css defines more than one statement, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.
Multiple statements:
Tip: if you want to define more than one declaration, you need to separate each declaration with a semicolon. The following example shows how to define a central paragraph of red text. The last rule does not require a semicolon, because a semicolon is a separator in English, not a closing symbol. However, most experienced designers put a semicolon at the end of each declaration, which has the advantage of minimizing errors when you add or subtract statements from existing rules. It's like this:
P {text-align:center; color:red;}
You should describe only one attribute per line to enhance the readability of the style definition, like this:
P {text-align: center; color: black; font-family: arial;} Thank you for reading this article carefully. I hope the article "how to define more than one statement of css" shared by the editor will be helpful to you. At the same time, I hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!