03.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. <style>
  7. body {
  8. margin: 0;
  9. }
  10. * {
  11. box-sizing: border-box;
  12. }
  13. /*ul {*/
  14. /*margin: 0;*/
  15. /*padding: 0;*/
  16. /*}*/
  17. .menu {
  18. /*list-style-type: none;*/
  19. /*margin: 0;*/
  20. /*padding: 0;*/
  21. /*background-color: grey;*/
  22. /*overflow: hidden;*/
  23. margin: 0;
  24. padding: 0;
  25. list-style-type: none;
  26. overflow: hidden;
  27. background-color: #777;
  28. }
  29. .menu li {
  30. float: left;
  31. }
  32. .menu li a {
  33. /*display: inline-block;*/
  34. /*text-decoration: none;*/
  35. /*color: white;*/
  36. /*padding: 16px;*/
  37. /*text-align: center;*/
  38. display: inline-block;
  39. color: white;
  40. text-align: center;
  41. padding: 16px;
  42. text-decoration: none;
  43. }
  44. ul li.active {
  45. background-color: #4CAF50;
  46. }
  47. section {
  48. overflow: hidden;
  49. }
  50. section > div {
  51. float: left;
  52. padding: 10px;
  53. }
  54. .left {
  55. width: 25%;
  56. /*background-color: #0d8ddb;*/
  57. padding: 15px;
  58. }
  59. .right {
  60. width: 75%;
  61. /*background-color: green;*/
  62. padding: 15px;
  63. }
  64. section li {
  65. list-style-type: none;
  66. }
  67. .left a {
  68. text-decoration: none;
  69. }
  70. .left li {
  71. background-color: #eee;
  72. padding: 8px;
  73. margin-bottom: 4px;
  74. }
  75. .left a {
  76. color: #666;
  77. }
  78. .active {
  79. background-color: #008CBA;
  80. }
  81. .active a {
  82. color: white;
  83. }
  84. </style>
  85. </head>
  86. <body>
  87. <!--<header>-->
  88. <ul class="menu">
  89. <li class="active"><a href="">主页</a></li>
  90. <li><a href="">新闻</a></li>
  91. <li><a href="">联系我们</a></li>
  92. <li><a href="">关于我们</a></li>
  93. </ul>
  94. <!--</header>-->
  95. <section>
  96. <div class="left">
  97. <ul>
  98. <li class="active"><a href="">The Flight</a></li>
  99. <li><a href="">The City</a></li>
  100. <li><a href="">The Island</a></li>
  101. <li><a href="">The Food</a></li>
  102. <li><a href="">The People</a></li>
  103. <li><a href="">The History</a></li>
  104. <li><a href="">The Oceans</a></li>
  105. </ul>
  106. </div>
  107. <div class="right">
  108. <div style="text-align: center;padding: 20px;background-color: #0d8ddb;color: white"><h1>The City</h1></div>
  109. <h1 style="font-size: 2em">World</h1>
  110. <p>Chania is the capital of the Chania region on the island of Crete. The city can be divided in two parts, the old town and the modern city.</p>
  111. <p>You will learn more about responsive web pages in a later chapter.</p>
  112. </div>
  113. </section>
  114. <footer style="background-color: #444;color: white;padding: 10px"><h3>底部文字</h3></footer>
  115. </body>
  116. </html>