movie.html

    1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <title>正在热映--猫眼电影</title>
    8. <link rel="stylesheet" href="css/reset.css">
    9. <link rel="stylesheet" href="css/movie.css">
    10. <link rel="stylesheet" href="css/common.css">
    11. </head>
    12. <body>
    13. <div class="main">
    14. <!-- 菜单 -->
    15. <nav class="nav">
    16. <a href="" class="select">正在热映</a>
    17. <a href="">即将上映</a>
    18. <a href="">经典影片</a>
    19. </nav>
    20. <div class="container">
    21. <div class="choose-area">
    22. <div class="choose-item clearfix">
    23. <div class="left">类型:</div>
    24. <div class="right">
    25. <ul class="clearfix">
    26. <li class="select"><a href="">全部</a></li>
    27. <li><a href="">Consequuntur.</a></li>
    28. <li><a href="">Aperiam!</a></li>
    29. <li><a href="">Non?</a></li>
    30. <li><a href="">Officia.</a></li>
    31. <li><a href="">Ut.</a></li>
    32. <li><a href="">Reiciendis?</a></li>
    33. <li><a href="">Velit?</a></li>
    34. <li><a href="">Asperiores.</a></li>
    35. <li><a href="">Velit?</a></li>
    36. <li><a href="">Laudantium.</a></li>
    37. <li><a href="">Incidunt!</a></li>
    38. <li><a href="">Impedit?</a></li>
    39. <li><a href="">Ipsam?</a></li>
    40. <li><a href="">Suscipit!</a></li>
    41. <li><a href="">Perspiciatis!</a></li>
    42. <li><a href="">Doloribus.</a></li>
    43. <li><a href="">Molestiae!</a></li>
    44. <li><a href="">Eos.</a></li>
    45. <li><a href="">Perferendis?</a></li>
    46. </ul>
    47. </div>
    48. </div>
    49. <div class="choose-item clearfix">
    50. <div class="left">区域:</div>
    51. <div class="right">
    52. <ul class="clearfix">
    53. <li><a href="">全部</a></li>
    54. <li><a href="">Consequuntur.</a></li>
    55. <li><a href="">Aperiam!</a></li>
    56. <li><a href="">Non?</a></li>
    57. <li><a href="">Officia.</a></li>
    58. <li><a href="">Ut.</a></li>
    59. <li><a href="">Reiciendis?</a></li>
    60. <li><a href="">Velit?</a></li>
    61. <li><a href="">Asperiores.</a></li>
    62. <li><a href="">Velit?</a></li>
    63. <li><a href="">Laudantium.</a></li>
    64. <li><a href="">Incidunt!</a></li>
    65. <li><a href="">Impedit?</a></li>
    66. <li><a href="">Ipsam?</a></li>
    67. <li><a href="">Suscipit!</a></li>
    68. <li><a href="">Perspiciatis!</a></li>
    69. <li><a href="">Doloribus.</a></li>
    70. <li><a href="">Molestiae!</a></li>
    71. <li><a href="">Eos.</a></li>
    72. <li><a href="">Perferendis?</a></li>
    73. </ul>
    74. </div>
    75. </div>
    76. <div class="choose-item clearfix no-line">
    77. <div class="left">年代:</div>
    78. <div class="right">
    79. <ul class="clearfix">
    80. <li><a href="">全部</a></li>
    81. <li><a href="">Consequuntur.</a></li>
    82. <li><a href="">Aperiam!</a></li>
    83. <li><a href="">Non?</a></li>
    84. <li><a href="">Officia.</a></li>
    85. <li><a href="">Ut.</a></li>
    86. <li><a href="">Reiciendis?</a></li>
    87. <li><a href="">Velit?</a></li>
    88. <li><a href="">Asperiores.</a></li>
    89. <li><a href="">Velit?</a></li>
    90. <li><a href="">Laudantium.</a></li>
    91. <li><a href="">Incidunt!</a></li>
    92. <li><a href="">Impedit?</a></li>
    93. <li><a href="">Ipsam?</a></li>
    94. <li><a href="">Suscipit!</a></li>
    95. <li><a href="">Perspiciatis!</a></li>
    96. <li><a href="">Doloribus.</a></li>
    97. <li><a href="">Molestiae!</a></li>
    98. <li><a href="">Eos.</a></li>
    99. <li><a href="">Perferendis?</a></li>
    100. </ul>
    101. </div>
    102. </div>
    103. </div>
    104. <div class="movies clearfix">
    105. <div class="movie-item">
    106. <div class="poster">
    107. <a href="">
    108. <img src="./img/2.jpg" alt="" class="img1">
    109. </a>
    110. </div>
    111. <div class="name">
    112. <a href="">
    113. 你的婚礼
    114. </a>
    115. </div>
    116. <div class="score">
    117. 9.2
    118. </div>
    119. </div>
    120. <div class="movie-item">
    121. <div class="poster">
    122. <a href="">
    123. <img src="./img/2.jpg" alt="" class="img1" class="img1">
    124. </a>
    125. </div>
    126. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    127. <div class="score">9.4</div>
    128. </div>
    129. <div class="movie-item">
    130. <div class="poster">
    131. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    132. </div>
    133. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    134. <div class="score">9.4</div>
    135. </div>
    136. <div class="movie-item">
    137. <div class="poster">
    138. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    139. </div>
    140. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    141. <div class="score">9.4</div>
    142. </div>
    143. <div class="movie-item">
    144. <div class="poster">
    145. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    146. </div>
    147. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    148. <div class="score">9.4</div>
    149. </div>
    150. <div class="movie-item">
    151. <div class="poster">
    152. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    153. </div>
    154. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    155. <div class="score">9.4</div>
    156. </div>
    157. <div class="movie-item">
    158. <div class="poster">
    159. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    160. </div>
    161. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    162. <div class="score">9.4</div>
    163. </div>
    164. <div class="movie-item">
    165. <div class="poster">
    166. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    167. </div>
    168. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    169. <div class="score">9.4</div>
    170. </div>
    171. <div class="movie-item">
    172. <div class="poster">
    173. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    174. </div>
    175. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    176. <div class="score">9.4</div>
    177. </div>
    178. <div class="movie-item">
    179. <div class="poster">
    180. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    181. </div>
    182. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    183. <div class="score">9.4</div>
    184. </div>
    185. <div class="movie-item">
    186. <div class="poster">
    187. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    188. </div>
    189. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    190. <div class="score">9.4</div>
    191. </div>
    192. <div class="movie-item">
    193. <div class="poster">
    194. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    195. </div>
    196. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    197. <div class="score">9.4</div>
    198. </div>
    199. <div class="movie-item">
    200. <div class="poster">
    201. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    202. </div>
    203. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    204. <div class="score">9.4</div>
    205. </div>
    206. <div class="movie-item">
    207. <div class="poster">
    208. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    209. </div>
    210. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    211. <div class="score">9.4</div>
    212. </div>
    213. <div class="movie-item">
    214. <div class="poster">
    215. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    216. </div>
    217. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    218. <div class="score">9.4</div>
    219. </div>
    220. <div class="movie-item">
    221. <div class="poster">
    222. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    223. </div>
    224. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    225. <div class="score">9.4</div>
    226. </div>
    227. <div class="movie-item">
    228. <div class="poster">
    229. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    230. </div>
    231. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    232. <div class="score">9.4</div>
    233. </div>
    234. <div class="movie-item">
    235. <div class="poster">
    236. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    237. </div>
    238. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    239. <div class="score">9.4</div>
    240. </div>
    241. <div class="movie-item">
    242. <div class="poster">
    243. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    244. </div>
    245. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    246. <div class="score">9.4</div>
    247. </div>
    248. <div class="movie-item">
    249. <div class="poster">
    250. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    251. </div>
    252. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    253. <div class="score">9.4</div>
    254. </div>
    255. <div class="movie-item">
    256. <div class="poster">
    257. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    258. </div>
    259. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    260. <div class="score">9.4</div>
    261. </div>
    262. <div class="movie-item">
    263. <div class="poster">
    264. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    265. </div>
    266. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    267. <div class="score">9.4</div>
    268. </div>
    269. <div class="movie-item">
    270. <div class="poster">
    271. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    272. </div>
    273. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    274. <div class="score">9.4</div>
    275. </div>
    276. <div class="movie-item">
    277. <div class="poster">
    278. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    279. </div>
    280. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    281. <div class="score">9.4</div>
    282. </div>
    283. <div class="movie-item">
    284. <div class="poster">
    285. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    286. </div>
    287. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    288. <div class="score">9.4</div>
    289. </div>
    290. <div class="movie-item">
    291. <div class="poster">
    292. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    293. </div>
    294. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    295. <div class="score">9.4</div>
    296. </div>
    297. <div class="movie-item">
    298. <div class="poster">
    299. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    300. </div>
    301. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    302. <div class="score">9.4</div>
    303. </div>
    304. <div class="movie-item">
    305. <div class="poster">
    306. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    307. </div>
    308. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    309. <div class="score">9.4</div>
    310. </div>
    311. <div class="movie-item">
    312. <div class="poster">
    313. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    314. </div>
    315. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    316. <div class="score">9.4</div>
    317. </div>
    318. <div class="movie-item">
    319. <div class="poster">
    320. <a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
    321. </div>
    322. <div class="name"><a href="">复仇者联盟4:终局之战</a></div>
    323. <div class="score">9.4</div>
    324. </div>
    325. </div>
    326. <div class="pager">
    327. <a href="">上一页</a>
    328. <a href="">1</a>
    329. <a href="">2</a>
    330. <a href="" class="select">3</a>
    331. <a href="">4</a>
    332. <a href="">5</a>
    333. <a href="">6</a>
    334. <a href="">7</a>
    335. <a href="">8</a>
    336. <a href="">9</a>
    337. <a href="">10</a>
    338. <a href="">下一页</a>
    339. </div>
    340. </div>
    341. </div>
    342. </body>
    343. </html>

    movie.css

    1. body {
    2. color: #333;
    3. }
    4. .clearfix::after {
    5. content: "";
    6. display: block;
    7. clear: both;
    8. }
    9. .main {
    10. line-height: 1.5;
    11. }
    12. .main .nav {
    13. height: 60px;
    14. background: #47464a;
    15. color: #999;
    16. text-align: center;
    17. line-height: 60px;
    18. }
    19. .main .nav a {
    20. margin: 0 38px;
    21. }
    22. .main .nav a:hover {
    23. color: #fff;
    24. }
    25. .main .nav a.select {
    26. color: #ef4238;
    27. }
    28. .main .container {
    29. width: 1120px;
    30. margin: 0 auto;
    31. }
    32. .main .container .choose-area {
    33. border: 1px solid #e5e5e5;
    34. margin: 40px 0;
    35. font-size: 14px;
    36. line-height: 30px;
    37. padding: 0 30px;
    38. }
    39. .main .container .choose-area .choose-item {
    40. margin: 1em 0;
    41. border-bottom: 1px dotted #e5e5e5;
    42. }
    43. .main .container .choose-area .choose-item.no-line {
    44. border: none;
    45. }
    46. .main .container .choose-area .choose-item .left {
    47. float: left;
    48. color: #999;
    49. }
    50. .main .container .choose-area .choose-item .right {
    51. float: left;
    52. width: 1020px;
    53. }
    54. .main .container .choose-area .choose-item .right li {
    55. float: left;
    56. margin: 0 9px;
    57. padding: 0 6px;
    58. }
    59. .main .container .choose-area .choose-item .right li:hover {
    60. color: #ef4238;
    61. }
    62. .main .container .choose-area .choose-item .right li.select {
    63. background: #ef4238;
    64. color: #fff;
    65. /* CSS3 圆角边框 */
    66. border-radius: 12px;
    67. }
    68. .main .container .movies .movie-item {
    69. float: left;
    70. width: 160px;
    71. margin: 10px 30px 10px 0;
    72. }
    73. .main .container .movies .movie-item:nth-child(6n) {
    74. margin-right: 0;
    75. }
    76. .main .container .movies .movie-item .poster img {
    77. width: 160px;
    78. height: 220px;
    79. }
    80. .main .container .movies .movie-item .name {
    81. white-space: nowrap;
    82. overflow: hidden;
    83. text-overflow: ellipsis;
    84. padding: 0 2px;
    85. text-align: center;
    86. }
    87. .main .container .movies .movie-item .score {
    88. white-space: nowrap;
    89. color: #ffb400;
    90. text-align: center;
    91. line-height: 2.5;
    92. font-style: italic;
    93. font-size: 20px;
    94. }
    95. .main .container .movies .movie-item .score::first-letter {
    96. font-size: 1.5em;
    97. }

    comm.css

    1. /* 多页面的通用样式 */
    2. .pager {
    3. margin: 2em 0;
    4. text-align: center;
    5. /* margin: 25px 25px; */
    6. }
    7. .pager a {
    8. border: 1px solid #d8d8d8;
    9. padding: 5px 10px;
    10. margin: 10px 5px;
    11. }
    12. .pager a:hover {
    13. border-color: #ef4238;
    14. }
    15. .pager a.select {
    16. background: #ef4238;
    17. color: #fff;
    18. border: none;
    19. }

    reset.css

    1. /* http://meyerweb.com/eric/tools/css/reset/
    2. v2.0 | 20110126
    3. License: none (public domain)
    4. */
    5. html,
    6. body,
    7. div,
    8. span,
    9. applet,
    10. object,
    11. iframe,
    12. h1,
    13. h2,
    14. h3,
    15. h4,
    16. h5,
    17. h6,
    18. p,
    19. blockquote,
    20. pre,
    21. a,
    22. abbr,
    23. acronym,
    24. address,
    25. big,
    26. cite,
    27. code,
    28. del,
    29. dfn,
    30. em,
    31. img,
    32. ins,
    33. kbd,
    34. q,
    35. s,
    36. samp,
    37. small,
    38. strike,
    39. strong,
    40. sub,
    41. sup,
    42. tt,
    43. var,
    44. b,
    45. u,
    46. i,
    47. center,
    48. dl,
    49. dt,
    50. dd,
    51. ol,
    52. ul,
    53. li,
    54. fieldset,
    55. form,
    56. label,
    57. legend,
    58. table,
    59. caption,
    60. tbody,
    61. tfoot,
    62. thead,
    63. tr,
    64. th,
    65. td,
    66. article,
    67. aside,
    68. canvas,
    69. details,
    70. embed,
    71. figure,
    72. figcaption,
    73. footer,
    74. header,
    75. hgroup,
    76. menu,
    77. nav,
    78. output,
    79. ruby,
    80. section,
    81. summary,
    82. time,
    83. mark,
    84. audio,
    85. video {
    86. margin: 0;
    87. padding: 0;
    88. border: 0;
    89. font-size: 100%;
    90. font: inherit;
    91. vertical-align: baseline;
    92. }
    93. /* HTML5 display-role reset for older browsers */
    94. article,
    95. aside,
    96. details,
    97. figcaption,
    98. figure,
    99. footer,
    100. header,
    101. hgroup,
    102. menu,
    103. nav,
    104. section {
    105. display: block;
    106. }
    107. body {
    108. line-height: 1;
    109. }
    110. ol,
    111. ul {
    112. list-style: none;
    113. }
    114. blockquote,
    115. q {
    116. quotes: none;
    117. }
    118. blockquote:before,
    119. blockquote:after,
    120. q:before,
    121. q:after {
    122. content: '';
    123. content: none;
    124. }
    125. table {
    126. border-collapse: collapse;
    127. border-spacing: 0;
    128. }
    129. a {
    130. text-decoration: none;
    131. color: inherit;
    132. }

    效果:
    2021-4-17[CSS-浮动练习] - 图1