新版梦工厂手机端官网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.7 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="line_cards">
  3. <div class="card" v-for="item in caseList" :key="item.id">
  4. <p class="title">{{ item.title }}</p>
  5. <div class="img_box">
  6. <img :src="item.picUrl" class="img" />
  7. <div class="bottom_text">
  8. <p>工业设计</p>
  9. <p>软硬件研发</p>
  10. <p>样机制作</p>
  11. <p>量产</p>
  12. </div>
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup>
  18. const props = defineProps({
  19. caseList: {
  20. type: Array,
  21. },
  22. })
  23. </script>
  24. <style lang="scss" scoped>
  25. .line_cards {
  26. display: grid;
  27. grid-template-columns: repeat(2, 1fr);
  28. grid-template-rows: repeat(5, 1fr);
  29. column-gap: 7px;
  30. padding: 0 7px;
  31. box-sizing: border-box;
  32. row-gap: 7px;
  33. .card {
  34. background: #ffffff;
  35. border-radius: 3px;
  36. flex: 1;
  37. box-sizing: border-box;
  38. display: flex;
  39. flex-direction: column;
  40. padding: 11px 7px 7px 7px;
  41. .title {
  42. font-size: 8px;
  43. font-family: Source Han Sans CN;
  44. font-weight: 400;
  45. color: #2f2f2f;
  46. padding-left: 2px;
  47. margin-bottom: 6px;
  48. }
  49. .img_box {
  50. width: 100%;
  51. height: 100%;
  52. position: relative;
  53. .img {
  54. width: 100%;
  55. height: 100%;
  56. object-fit: cover;
  57. }
  58. .bottom_text {
  59. position: absolute;
  60. left: -50%;
  61. bottom: -7px;
  62. background: rgba(0, 0, 0, 0.2);
  63. display: flex;
  64. padding: 5px 0;
  65. align-items: center;
  66. justify-content: space-evenly;
  67. font-size: 16px;
  68. font-family: Source Han Sans CN;
  69. font-weight: 400;
  70. color: #ffffff;
  71. width: 200%;
  72. transform: scale(0.5);
  73. }
  74. }
  75. }
  76. }
  77. </style>