1 <!DOCTYPE HTML>2 <HTMLxmlns= "http://www.w3.org/1999/xhtml">3 <Head>4 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"/>5 <title>LOL</title>6 <Linkhref= "Css/lol.css"rel= "stylesheet"/>7 </Head>8 <Body>9 <DivID= "LPL">Ten <Divclass= "ll"><imgsrc= "Image/1.jpg"alt= "Alternate Text" /></Div> One <Divclass= "pp"><ahref= "http://lol.qq.com/act/a20160708pool/?atm_cl=ad&atm_pos=16601&e_code=246926"Target= "_blank">View Details</a></Div> A </Div> - </Body> - </HTML>
1 * {2 margin:0px;3 padding:0px;4 font-family:"Microsoft Jas Black";5}6 7 #lpl{/*picture Horizontal, vertical center*/8 width:562px;9 Height:234px;Ten position:Absolute; One Left:50%; A Margin-left:-281px; - Top:50%; - Margin-top:-117px; the} - - . PP{/*div position in Upper Div, set font, background, etc.*/ - width:150px; + Height:35px; - Background-color:#f00; + position:Absolute; A Line-height:35px; at margin:-71px 44%; - Border-radius:12px; - cursor:Pointer; -} - - a{/*hyperlinks to underline, font water Center*/ in text-decoration:None; - Color:#fff; to text-align:Center; + Display:Block; -}
Self-taught HTML and CSS code for the first day