In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what are the advanced application methods of Css". In daily operation, I believe that many people have doubts about the advanced application methods of Css. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what are the advanced application methods of Css?" Next, please follow the editor to study!
1. Basic selector (single)
Universal selector (*): will match all HTML elements
Tag selector: corresponds to all HTML tags, with the same name as the tag name.
Class selector: you can add styles by defining the same class attribute for a class of HTML elements. Class styles are defined with "." The beginning definition. The CLASS property of CSS generally uses tables for cascading styles. For example:
.news indicates that the element of class=news adds style
News indicates that the element of class=news adds style.
.news title represents the elements of class=title under class=news
ID selector: adds styling to HTML elements that mark specific ID attributes. \
Definition of Id selector, starting with the "#" sign
A web page cannot have the same value of ID. ID is unique like an ID number.
The ID attribute of the HTML element, which is generally used by JavaScript
2. Combination selector
Multi-element selector: that is to define multiple HTML elements at the same time.
Body,p,a,ul,li,p {margin:0px;padding:0px;}
Each HTML element has a default style.
Descendant element selector: separate selectors with spaces.
.news .title p {background-color:#FF0000;}
Child element selector: use the > sign to separate the parent-child selector, there is no third-level problem.
Third, pseudo-class selector
Pseudo-class selectors generally add styling to hyperlinks.
Hyperlinks have four states:
Normal status a:link {}
Put the status a:hover {}
Activation status a:active {}
Visited status a:visited {}
Global link
A:link,a:visited {color:#333;text-decoration:none;}
A:hover {color:#FF0000,text-decoration:underline;}
Add class styles to links (class= "a2")
A.a2:link,a.a2:visited {}
A.a2:hover {}
At this point, the study of "what are the advanced application methods of Css" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.