<!DOCTYPE HTML><HTML><Head> <MetaCharSet= "Utf-8" > <title>CSS Selector</title> <styletype= "Text/css"> /*HTML document css:root{border:solid 1px red; }; */ /*Word selector with > No need to take*/ /*ul > li{color:red; }*/ /*ul > li:first-child{color:red; } ul > li:last-child{color:red; } */ /*enable and disallow input CSS for the input box*/ /*input:enabled{border:1px solid red; } input:disabled{border:1px solid blue; }*/ /*Verify success shows blue, verification does not successfully display green*/ /*input:valid{border:1px solid blue; } input:invalid{border:1px solid green; }*/ /*mandatory form and no filling form*/ /*input:required{} input:optional{}*/ /*1. Display 2. Display after the visit 3. Mouse Movement 4. Click on the display after the fixed*/ /*a:link{} a:visited{} a:hover{} a:active{}*/ /*Google is not compatible when getting cursors*/ /*input:focus{border:1px solid red; }*/ /*A element of a tag Href!=baidu*/ /*A:not ([href*= "Baidu"]) {color:red; }*/ /*em is relative to the font size hook, very flexible*/P{margin:0;padding:0;background:Gray;font-size:20px;width:50%; } </style></Head><Body> <ul> <Li>1th Sub-element of UL</Li> <Li>2nd sub-element of UL</Li> <Li>3rd sub-element of UL</Li> <Li>4th Sub-element of UL</Li> </ul> <inputtype= "text" /> <inputtype= "Email" /> <BR/> <ahref= "Http:www.baidu.com" >Baidu</a> <ahref= "Http:www.google.com" >Google</a> <ahref= "Http:www.haosou.com" >Haosou</a> <P> EM Unit explanation EM Unit explanation EM Unit explanation EM Unit explanation EM Unit explanation</P></Body></HTML>
Some notes in the HTML5 CSS3