练习题4_猫眼电影移动端.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <script src="./rem.js"></script>
  8. <style>
  9. body{
  10. margin: 0;
  11. }
  12. ul{
  13. margin:0;
  14. padding:0;
  15. }
  16. li{
  17. list-style: none;
  18. }
  19. .container{
  20. font-size: .36rem;
  21. }
  22. /* 头部 */
  23. .top-head header{
  24. background-color: #e54847;
  25. height: 0.7rem;
  26. text-align: center;
  27. line-height: 0.7rem;
  28. position: relative;
  29. }
  30. .top-head header span{
  31. color: #fff;
  32. }
  33. .top-head .more-btn{
  34. position: absolute;
  35. right: 20px;
  36. top:0;
  37. }
  38. .top-head .more-btn ul{
  39. position: absolute;
  40. top: 0.5rem;
  41. left: -1.5rem;
  42. width: 2rem;
  43. z-index: 1;
  44. box-shadow: 0 .06rem .18rem 0 rgba(0,0,0,.1);
  45. }
  46. .top-head .more-btn ul li{
  47. height: .9rem;
  48. line-height: .9rem;
  49. font-size: 0.3rem;
  50. text-align: center;
  51. color: #333;
  52. background-color: #fff;
  53. border-bottom: .02rem solid #f0f0f0;
  54. }
  55. .top-head .more-btn img{
  56. width: .3rem;
  57. height: .3rem;
  58. }
  59. /* 头部导航 */
  60. .top-head nav{
  61. height: .9rem;
  62. border-bottom: 0.02rem solid #e6e6e6;
  63. display: flex;
  64. justify-content: space-between;
  65. padding: 0 .2rem;
  66. align-items: center;
  67. }
  68. .top-head .nav-center{
  69. flex-grow:3;
  70. margin: 0 .2rem;
  71. position: relative;
  72. }
  73. .top-head .nav-center ul{
  74. display: flex;
  75. justify-content: space-around;
  76. font-size: .3rem;
  77. font-weight: 700;
  78. color: #666;
  79. align-items: center;
  80. }
  81. .top-head .nav-center .bottom-line{
  82. position: absolute;
  83. bottom: -5px;
  84. left: 4vw;
  85. width: .4rem;
  86. height: 3px;
  87. border-radius: 3px;
  88. background-color: #f03d37;
  89. }
  90. .top-head .nav-center .active{
  91. color: #333;
  92. font-size: .34rem;
  93. }
  94. .top-head .nav-right{
  95. flex-grow: 1;
  96. display: flex;
  97. align-items: center;
  98. justify-content: center;
  99. }
  100. .top-head .nav-right img{
  101. width: .4rem;
  102. height: .4rem;
  103. }
  104. .top-head .nav-left{
  105. display: flex;
  106. align-items: center;
  107. }
  108. .top-head .nav-left span{
  109. color: #666;
  110. font-size: .3rem;
  111. }
  112. .top-head .nav-left i{
  113. border-top:5px solid #666;
  114. border-left: 5px solid transparent;
  115. border-right: 5px solid transparent;
  116. border-bottom: 5px solid transparent;
  117. transform: translate(3px,3px);
  118. }
  119. </style>
  120. </head>
  121. <body>
  122. <div class="container">
  123. <div class="top-head">
  124. <header>
  125. <span>猫眼电影</span>
  126. <div class="more-btn">
  127. <img src="./img/list.png" alt="list">
  128. <ul>
  129. <li>首页</li>
  130. <li>榜单</li>
  131. <li>热点</li>
  132. <li>商城</li>
  133. </ul>
  134. </div>
  135. </header>
  136. <nav>
  137. <div class="nav-left">
  138. <span>哈尔滨</span>
  139. <i></i>
  140. </div>
  141. <div class="nav-center">
  142. <ul>
  143. <li class="active">热播</li>
  144. <li>影院</li>
  145. <li>待映</li>
  146. <li>经典电影</li>
  147. </ul>
  148. <div class="bottom-line"></div>
  149. </div>
  150. <div class="nav-right">
  151. <img src="./img/search.png" alt="img">
  152. </div>
  153. </nav>
  154. </div>
  155. <div class="center-content"></div>
  156. <div class="bottom-nav"></div>
  157. </div>
  158. </body>
  159. </html>