0 Comments

实例解析:使用DIV CSS网页布局实现Google首页(3)

发布于:2013-07-22  |   作者:广州网站建设  |   已聚集:人围观

第三部分、DIV CSS网页布局之完整代码

如下: 


  1.  
  2.  
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
  4. <htmlxmlnshtmlxmlns="http://www.w3.org/1999/xhtml"> 
  5. <head> 
  6. <metahttp-equivmetahttp-equiv="Content-Type"content="text/html;charset=UTF-8"/> 
  7. <title>Googletitle> 
  8. <styletypestyletype="text/css"> 
  9. body{  
  10. background:#FFF;  
  11. color:#000;  
  12. font-family:Arial,sans-serif;  
  13. font-size:13px;  
  14. text-align:center;  
  15. margin-top:3px;  
  16. }  
  17. a:link{  
  18. color:#00C;  
  19. }  
  20. a:visited{  
  21. color:#551a8b;  
  22. }  
  23. #login{  
  24. text-align:right;  
  25. }  
  26. #stype{  
  27. margin-bottom:4px;  
  28. }  
  29. #stypespan{  
  30. padding:06px;  
  31. }  
  32. #search{  
  33. margin:0auto;  
  34. width:400px;  
  35. position:relative;  
  36. }  
  37. #more{  
  38. width:4em;  
  39. position:absolute;  
  40. top:0;  
  41. right:-4.5em;  
  42. }  
  43. #ft{  
  44. margin:54pxauto16px;  
  45. }  
  46. style> 
  47. head> 
  48.  
  49. <body> 
  50. <divstyledivstyle="text-align:right"><ahrefahref="ig">个性化主页a>|<ahrefahref="MyAccount"> 
  51.  
  52. 我的帐户a>|<ahrefahref="logout">退出a>div> 
  53. <divstyledivstyle="margin:4pxauto19px;"> 
  54.  
  55. <imgsrcimgsrc="http://www.google.com/intl/zh-CN_ALL/images/logo.gif"alt="Google"/>div> 
  56.  
  57. <dividdivid="stype"><span><strong>网页strong>span><span><ahrefahref="pic">图片a> 
  58.  
  59. span><span><ahrefahref="info">资讯a>span><span><ahrefahref="group">论坛a>span><span> 
  60.  
  61. <ahrefahref="more"><strong>更多»strong>a>span>div> 
  62.  
  63. <formidformid="search"action=""method="post"> 
  64. <div><inputtypeinputtype="text"size="55"title="Google搜索"/>div> 
  65. <div><buttontypebuttontype="submit">Google搜索button><button>手气不错button>div> 
  66. <divstyledivstyle="margin-top:6px;"><label><inputtypeinputtype="radio"name="t"checked="checked"/> 
  67.  
  68. 搜索所有网页label><label><inputtypeinputtype="radio"name="t"/>中文网页label><label> 
  69.  
  70. <inputtypeinputtype="radio"name="t"/>简体中文网页label>div> 
  71. <dividdivid="more"><ahrefahref="advanced_search">高级搜索a> 
  72.  
  73. <ahrefahref="pref">使用偏好a><ahrefahref="lang">语言工具a>div> 
  74. form> 
  75.  
  76. <dividdivid="ft"><ahrefahref="ad">广告计划a>-<ahrefahref="all"> 
  77.  
  78. Google大全a>-<ahrefahref="en">Google.cominEnglisha>div> 
  79. <div>©2007Googlediv> 
  80. body> 
  81. html> 
  82.  

广州网站建设,网站建设,广州网页设计,广州网站设计

飞机