On the morning of April 9, November 19, the css style sheet was created on the morning of April 19.
--- Restore content start ---
Style sheet:
I. Inline: The style attribute is directly added to the label of the Content in the body. For example, <div>
3. External style sheet: Create a css file
Right-click the file, select css style, and add a style sheet. Add a newly created style sheet. A group of labels starting with the link will appear after the link is saved.
Selector:
1. Use the tag as the selector: Method: Take the p tag as an example, p {}
<Style> p {/* background color changed by all P labels */background: #000} </style>
2. class selector: the class value can be the same, starting with "."
<Style>. a {/* execute all the labels whose class value is a and change the attribute */background: #9C0} </style> <Div> </div>
</Body>
</Html>
3. id selector: the value of id cannot be repeated and starts "#".
<Head> <style> # a1 {/* the content of the tag whose id is a1. Change the attribute */background: #000} </style>
4. Compound selector:
(1) separated by commas (,).
<Head> <style> div, p {/* perform this operation on all div and p labels */background: #093 }</style> <P> </p>/* execute the label to change the background color */
</body>
(2) separated by spaces, indicating that future generations need to have an inclusive relationship
<Head> <style> div p {/* p label in the div, the properties executed */background: #093 }</style> </Div>
</body>
(3) Filtering:
<Head> <style> p. a3 {/* among all p tags, only the value of klass is a3 tag */background: #633 }</style> /* Execute this label to change the background color */
</div> </body>
--- Restore content end ---
Style sheet:
I. Inline: The style attribute is directly added to the label of the Content in the body. For example, <div>
3. External style sheet: Create a css file
Right-click the file, select css style, and add a style sheet. Add a newly created style sheet. A group of labels starting with the link will appear after the link is saved.
Selector:
1. Use the tag as the selector: Method: Take the p tag as an example, p {}
<Style> p {/* background color changed by all P labels */background: #000} </style>
2. class selector: the class value can be the same, starting with "."
<Style>. a {/* execute all the labels whose class value is a and change the attribute */background: #9C0} </style> <Div> </div>
</Body>
</Html>
3. id selector: the value of id cannot be repeated and starts "#".
<Head> <style> # a1 {/* the content of the tag whose id is a1. Change the attribute */background: #000} </style>
4. Compound selector:
(1) separated by commas (,).
<Head> <style> div, p {/* perform this operation on all div and p labels */background: #093 }</style> <P> </p>/* execute the label to change the background color */
</body>
(2) separated by spaces, indicating that future generations need to have an inclusive relationship
<Head> <style> div p {/* p label in the div, the properties executed */background: #093 }</style> </Div>
</body>
(3) Filtering:
<Head> <style> p. a3 {/* among all p tags, only the value of klass is a3 tag */background: #633 }</style> /* Execute this label to change the background color */
</div> </body>