css-Five kinds of selector

Source: Internet
Author: User

<!DOCTYPE HTML><HTML>  <Head>    <title>03-CSS Selector. html</title>    <Metaname= "Content-type"content= "text/html; CHARSET=GBK">        <!--<link rel= "stylesheet" type= "Text/css" href= "./styles.css" > -        <!--Tag Selector: Tag name {} ID selector: #idname {                        Note: The value of an ID can only occur once.                        Class selector:. classname{} Note: class represents a category that can occur more than once.                Pseudo-Class selector: Select a state of a label that needs to be used with other selectors.            L: Not visited V: visited H: Suspension A: Active, click Combo selector: #one,. two,a{ The Unified settings Style -    <styletype= "Text/css">P{Color:Yello;            }#one{Color:Red;            }. the{Color:Blue;            }A:link{Color:Red;            }a:visited{Color:Black;            }a:hover{Color:Pink;            }a:active{Color:Yellow;            }                    </style>      </Head>    <Body>   <P>This is my HTML page.</P><BR>    <PID= "One">This is my HTML page.</P>  <BR>    <Pclass= "both">This is my HTML page.</P>  <BR>    <ahref= "e:/mycode/day01-html/css/01-combination mode. html"Target= "_blank">Come on</a>      </Body></HTML>

1, a total of five kinds of selectors.

2, reasonable use of various selectors.

3, about pseudo-class selectors, according to the characteristics of each label to choose the appropriate properties.

css-Five kinds of selector

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.