classical_layout.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <style>
  7. * {
  8. margin: 0;
  9. padding: 0;
  10. font-family: Verdana, '宋体';
  11. }
  12. body {
  13. width: 960px;
  14. margin: 10px auto;
  15. background-image: url(img/dark-wood.jpg);
  16. }
  17. #header, #main, #footer {
  18. background-color: lightgray;
  19. margin: 10px 0;
  20. clear: both;
  21. }
  22. #header h1 {
  23. height: 60px;
  24. line-height: 60px;
  25. text-align: center;
  26. }
  27. #nav {
  28. height: 35px;
  29. text-align: center;
  30. }
  31. #nav ul li {
  32. line-height: 35px;
  33. width: 100px;
  34. margin:0 10px;
  35. display: inline-block;
  36. }
  37. a {
  38. text-decoration: none;
  39. }
  40. a:link, a:visited, a:active {
  41. color: black;
  42. }
  43. #nav ul li:hover {
  44. border-bottom: 4px solid red;
  45. }
  46. .feature {
  47. height: 250px;
  48. text-align: center;
  49. background-color: #ADD8E6;
  50. }
  51. .one, .two, .three {
  52. width: 300px;
  53. height: 150px;
  54. float: left;
  55. }
  56. .one {
  57. margin: 10px 15px 0 0;
  58. background-color: #FFEBCD;
  59. }
  60. .two {
  61. margin: 10px 15px;
  62. background-color: coral;
  63. }
  64. .three {
  65. margin: 10px 0 0 15px;
  66. background-color: darkseagreen;
  67. }
  68. #footer {
  69. text-align: center;
  70. line-height: 45px;
  71. height: 45px;
  72. font-size: 1.2em;
  73. }
  74. </style>
  75. </head>
  76. <body>
  77. <div id="header">
  78. <h1>Logo</h1>
  79. <div id="nav">
  80. <ul>
  81. <li><a href="">Home</a></li>
  82. <li><a href="">Products</a></li>
  83. <li><a href="">Services</a></li>
  84. <li><a href="">About</a></li>
  85. <li><a href="">Contact</a></li>
  86. </ul>
  87. </div>
  88. </div>
  89. <div id="main">
  90. <div class="feature">
  91. <!-- 这一块相当于是页面的最主要的区域 -->
  92. </div>
  93. <div class="one"></div>
  94. <div class="two"></div>
  95. <div class="three"></div>
  96. </div>
  97. <div id="footer">
  98. &copy; Copyright 2011
  99. </div>
  100. </body>
  101. </html>