第五天-CSS入门
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn"> 3 <head> 4 <meta name=“author” content=“孙悦” /> 5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> 6 <title>层叠样式表</title> 7 <meta name="keywords" content="关键字列表" /> 8 <meta name="description" content="网页描述" /> 9 <link rel="stylesheet" type="text/css" href="" /> 10 <style type="text/css"> 11 body,p,ul{ 12 padding:0; 13 margin:0; 14 } 15 div{ 16 color:#ff00ff; 17 font-size:25px; 18 border: 1px solid red; 19 text-align:center; 20 } 21 p{ 22 color:#00FFFF; 23 font-size:50px; 24 text-decoration:underline; 25 text-align:center; 26 background-image:url(1.jpg); 27 } 28 h1{ 29 width:808px; 30 border:3px solid red; 31 border-width:50%; 32 margin-left:auto; 33 margin-right:auto; 34 margin-top:0; 35 margin-bottom:0; 36 color:#ffff00; 37 text-align:center; 38 font-size:40px; 39 letter-spacing:50px; 40 line-height:50px; 41 } 42 ul{ 43 list-style-position:inside; 44 } 45 </style> 46 <script type="text/javascript"></script> 47 </head> 48 <body> 49 <div> 50 <ul> 51 <li>苍老师告诫我们:不能躺在床上挣钱,就不要在床上躺着。</li> 52 </ul> 53 </div> 54 <p>这里是一个段落。</p> 55 <h1>这里是一个标题</h1> 56 </body> 57 </html>