03.电影卡片练习.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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="../fa/css/all.css">
  10. <style>
  11. /* 设置外层容器 */
  12. .outer {
  13. width: 240px;
  14. margin: 100px auto;
  15. /* 设置阴影 */
  16. box-shadow: 0 0 10px rgba(0, 0, 0, .3);
  17. }
  18. /* 设置图片 */
  19. .img-wrapper img {
  20. width: 100%;
  21. vertical-align: bottom;
  22. }
  23. .info {
  24. padding: 0 18px;
  25. color: #acaaaa;
  26. font-size: 14px;
  27. }
  28. /* 设置标题 */
  29. .info .title {
  30. color: #717171;
  31. font-size: 18px;
  32. margin: 13px 0 15px 0;
  33. }
  34. .info .category i {
  35. margin-left: 4px;
  36. margin-right: 7px;
  37. }
  38. /* 设置简介的样式 */
  39. .info .intro {
  40. margin: 18px 4px;
  41. line-height: 20px;
  42. }
  43. /* 设置下边的内容 */
  44. .star-wrapper {
  45. height: 46px;
  46. line-height: 46px;
  47. border: 1px solid #e9e9e9;
  48. color: #ddd;
  49. padding: 0 16px;
  50. }
  51. /* 设置星星的样式 */
  52. .star-wrapper .star {
  53. float: left;
  54. }
  55. .star-wrapper .light{
  56. color: #b9cb41;
  57. }
  58. .star-wrapper .weibo{
  59. float: right;
  60. }
  61. </style>
  62. </head>
  63. <body>
  64. <!-- 创建一个外层容器 -->
  65. <div class="outer">
  66. <!-- 创建图片容器 -->
  67. <div class="img-wrapper">
  68. <!-- 设置图片 -->
  69. <img src="./images/1.jpg" alt="">
  70. </div>
  71. <!-- 创建内容区容器 -->
  72. <div class="info">
  73. <h2 class="title">动画电影</h2>
  74. <h3 class="category">
  75. <i class="fas fa-map-marker-alt"></i>
  76. 动画
  77. </h3>
  78. <p class="intro">迪士尼出的动画片,不知道好不好看</p>
  79. </div>
  80. <!-- 创建评分的容器 -->
  81. <div class="star-wrapper">
  82. <!-- 创建星星 -->
  83. <ul class="star">
  84. <li class="fas fa-star light"></li>
  85. <li class="fas fa-star light"></li>
  86. <li class="fas fa-star"></li>
  87. <li class="fas fa-star"></li>
  88. </ul>
  89. <ul class="weibo">
  90. <li class="fab fa-weibo"></li>
  91. </ul>
  92. </div>
  93. </div>
  94. </body>
  95. </html>