In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the id selector in CSS. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
CSS class selector
In CSS, the class selector is marked with a period. " Display:
.center {text-align: center}
Note: all HTML elements that have the center class are centered.
This heading will be center-alignedThis paragraph will also be center-aligned.
Tip: both H2 and p elements have center classes, and both will follow the rules in the ".center" selector.
Note: numbers cannot be used in the first character of a class name! It does not work in Mozilla/Firefox.
Like id, class can also be used as a derived selector
.fancy td {color: # f60; background: # 666;}
Note: the table cells inside the larger element of the class named fancy display orange text with a gray background.
Tip: a larger element named fancy may be a table or a div.
Elements can also be selected based on their classes
Td.fancy {color: # f60; background: # 666;}
Note: in the above example, the table cell named fancy will be orange with a gray background.
Tip: you can assign the class fancy to any table element as many times as you like.
Cells marked with fancy will be orange with a gray background. Cells that are not assigned a class named fancy are not affected by this rule.
It is also worth noting that paragraphs with class fancy will not be orange with a gray background, and of course, any other elements marked as fancy will not be affected by this rule.
This is all due to the way we write this rule, which is limited to table cells marked as fancy (that is, using the td element to select the fancy class).
This is the end of this article on "how to use id selectors in CSS". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.