当前位置:   article > 正文

css 列表划过缩放动画

css 列表划过缩放动画

  1. <template>
  2. <div>
  3. <div class="item" v-for="(item,index) in list" :key="index">
  4. <img src="../../../../aa.png" alt="">
  5. <div class="num">{{(index+1) < 10 ? '0'+(index+1) : index+1 }}</div>
  6. <div class="title">{{item}}</div>
  7. <div class="go"></div>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. data () {
  14. return {
  15. list: [
  16. '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
  17. '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
  18. '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
  19. '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头',
  20. '抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头,抽烟喝酒烫头'
  21. ]
  22. }
  23. }
  24. }
  25. </script>
  26. <style lang="less" scoped>
  27. .item {
  28. display: flex;
  29. align-items: center;
  30. background: #ffffff;
  31. box-shadow: 0px 2px 4px 0px rgba(0, 70, 139, 0.04);
  32. border-radius: 4px;
  33. transition: all 0.5s;
  34. padding: 20px;
  35. box-sizing: border-box;
  36. margin-top: 20px;
  37. position: relative;
  38. img {
  39. width: 58px;
  40. height: 58px;
  41. border-radius: 50%;
  42. }
  43. .num {
  44. margin: 0 20px;
  45. }
  46. .go {
  47. position: absolute;
  48. right: 20px;
  49. top: 50%;
  50. background: url('../../static/images/icon1.png');
  51. background-repeat: no-repeat;
  52. background-position: center center;
  53. background-size: 100% 100%;
  54. width: 36px;
  55. height: 36px;
  56. transform: translate(0, -50%);
  57. }
  58. cursor: pointer;
  59. &:hover {
  60. transform: scale(1.02);
  61. box-shadow: 0px 2px 8px 4px rgba(0, 70, 139, 0.04);
  62. color: #004ca1;
  63. .go {
  64. background: url('../../static/images/icon1-hover.png');
  65. background-repeat: no-repeat;
  66. background-position: center center;
  67. background-size: 100% 100%;
  68. width: 36px;
  69. height: 36px;
  70. position: absolute;
  71. top: 50%;
  72. right: 20px;
  73. transform: translate(0, -50%);
  74. }
  75. }
  76. }
  77. </style>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/150705
推荐阅读
相关标签
  

闽ICP备14008679号