• vue3 物体飘落效果


    html

    1. <template>
    2. <div class="content">
    3. <transition-group name="petal-fall" tag="ul">
    4. <img
    5. v-for="(petal, index) in petals"
    6. :key="index"
    7. class="petal"
    8. :src="petal.image"
    9. :style="petal.style"
    10. />
    11. transition-group>
    12. div>
    13. template>

    js

    css

    1. .content{
    2. background-image: url(../../../assets/web/service/BackgroundService.png);
    3. background-repeat: no-repeat;
    4. background-size:cover;
    5. width:100%;
    6. height:100vh;
    7. position: relative;
    8. .petal {
    9. position: absolute;
    10. width: 5vw;
    11. height: 5vw;
    12. animation: fallAnimation linear infinite;
    13. }
    14. @keyframes fallAnimation {
    15. 0% {
    16. transform: translateY(-100vh);
    17. }
    18. 100% {
    19. transform: translateY(110%);
    20. }
    21. }
    22. }

  • 相关阅读:
    关于卡片盒笔记法的研究
    物联网AI MicroPython传感器学习 之 GPS户外定位模块
    C++ 无符号类型
    【ESP32_8266_BT篇(二)】Beacon信标广播
    Kibana--配置大全
    Go结构体深度探索:从基础到应用
    Java 8 新特性 Ⅰ
    深入探究Linux文件:.sh、.swp文件的作用与意义 (linux .sh.swp)
    基于单片机的线路差动保护系统设计
    淘宝/Tmall商品详情页视频数据接口(视频数据,销量数据,sku属性数据,页面上有的数据均可以拿到,支持高并发)
  • 原文地址:https://blog.csdn.net/m0_59570698/article/details/134331888