The basic syntax of CSS3 The syntax of CSS3 is very simple, as follows: Write the selector first, and the selector is to select an element on the page. Then write a space after the selector, or leave it blank, but when you format the web page code, the space after the selector will be added automatically.
Then write a brace pair, which is the two keys after the letter P on the keyboard. Inside the braces is a list of styles of the current selector, in the form of-k: v; k:v; K:v each k:v is called a style. K is the attribute name and v is the value of the attribute.
Attribute names and attribute values are separated by English colons, which may or may not be followed by spaces. Each k:v and another k:v must be separated by an English semicolon. The last style of each selector can be written without semicolons. As follows: Each style of CSS can also be wrapped.
Of course, the writing without line breaks is also in line with the grammatical norms of CSS3, but it seems a bit messy. Of course, in the vscode editor, when writing css, colons and semicolons are automatically completed, and there is basically no typo. Comments on CSS3 Comments on CSS3 are as follows:
For example, in CSS code or CSS file, pressing Ctrl+/ shortcut key can quickly form comments. Now I create a file called "CSS3 Basic Grammar". Html ",and demonstrate the syntax and comments of CSS3.