index.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div class="ww-layout">
  3. <p class="ph">NO.{{data.num}}</p>
  4. <p>点赞数:{{data.zan}}</p>
  5. <div class="ww-detail">
  6. <p class="theme-color1">{{data.sub1}}</p>
  7. <p class="theme-color1">{{data.sub2}}</p>
  8. </div>
  9. <p class="theme-color1">{{data.name}}</p>
  10. <div class="img" :style="{backgroundImage: `url(${data.img})`}"></div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. props: ['data']
  16. }
  17. </script>
  18. <style scoped>
  19. .ww-layout{
  20. width:100%;
  21. height:200px;
  22. background:rgba(255,255,255,0.05);
  23. border-radius:3px;
  24. position: relative;
  25. overflow: hidden;
  26. padding: 1rem;
  27. }
  28. .ww-layout .img{
  29. position: absolute;
  30. right: 0;
  31. top: 0;
  32. width: 200px;
  33. height: 200px;
  34. background-image: url(https://show.4dage.com/3D/2018/model/SD/images/s02.jpg);
  35. background-position: center;
  36. background-size: auto 100%;
  37. background-repeat: no-repeat;
  38. }
  39. .ph{
  40. color:#532f1c;
  41. font-size: 32px;
  42. font-weight: bold;
  43. }
  44. .ww-detail{
  45. margin: 25px 0;
  46. }
  47. .ww-detail p{
  48. margin-bottom: 4px;
  49. }
  50. p{
  51. margin-bottom: 12px;
  52. }
  53. </style>