What is the syntax of the CSS ID selector
This article mainly explains "What is the syntax of CSS ID selector". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "What is the syntax of CSS ID selector"!
In some ways, ID selectors are exclusive of class selectors, with some essential differences.
syntax
At the beginning, the ID determiner is preceded by a #sign-also known as a checkerboard sign or a pound sign.
See the following rules:
*#intro {font-weight:bold;}
As with the class determiner, the wildcard determiner may be omitted from the ID determiner. The opposite example is also written approximately:
#intro {font-weight:bold;}
The effect of this selector will be the same.
The second difference is that the ID determinator does not reference the value of the class attribute; it does, of course, reference the value of the id attribute.
The following is an example of a theoretical ID determiner:
This is a paragraph of introduction.
What is the basic CSS syntax?
1. CSS rule consists of two parts: selector and one or more declarations;
2. Selectors are usually HTML elements that need to be styled;
Each declaration consists of an attribute and a value;
Attributes and attribute values are separated by colons.
At this point, I believe that everyone has a deeper understanding of "what is the syntax of CSS ID selector". Let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!