• 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. }

  • 相关阅读:
    DTLS、ICE--用janus举例
    【VASP】KPOINTS文件介绍
    游戏设计模式专栏(五):三步学会原型模式
    解码2022中国网安强星丨从“移动应用”到“万物互联”,梆梆安全做物联网时代的安全“守门人”
    测试开发基础 | Python 算法与数据结构面试题系列一(附答案)
    JVM 面试题
    Java踩坑笔记 —— base64转换为图片后图片显示不全
    HTML5-基本标签的使用
    VMware NSX 4.0 -- 网络安全虚拟化平台
    开发知识点-golang
  • 原文地址:https://blog.csdn.net/m0_59570698/article/details/134331888