当前位置: 首页> 娱乐> 影视 > 专业外包_宁波妇科医生推荐_网站推广技巧和方法_怎样做公司网站推广

专业外包_宁波妇科医生推荐_网站推广技巧和方法_怎样做公司网站推广

时间:2025/7/9 12:10:50来源:https://blog.csdn.net/m0_73035591/article/details/146054838 浏览次数:0次
专业外包_宁波妇科医生推荐_网站推广技巧和方法_怎样做公司网站推广

简单的入场与出场

<template>

  <div>

    <button @click="isShow=!isShow">显示/隐藏</button>

    <transition name="hello" appear><!--  appear设置打开界面就播放动画-->

    <h1 v-show="isShow"  >hello</h1>

    </transition>

  </div>

</template>

<script>

export default {

    name:'Test',

    data(){

        return{

            isShow:true

        }

    }

}

</script>

<style scoped>

h1{

    background-color: orange;

}

.hello-enter-active{              /* 进入的动画 */

  animation: atguigu 0.5s ;

}

.hello-leave-active{              /*退出的动画  */

  animation: atguigu 0.5s ;

}

@keyframes atguigu {

  from{

    transform: translateX(-100px);

  }

  to{

    transform: translateX(0px);

  }

}

</style>

<<QQ20241012-23644.mp4>>

过度效果

<template>

  <div>

    <button @click="isShow=!isShow">显示/隐藏</button>

    <transition name="hello" appear><!--  appear设置打开界面就播放动画-->

    <h1 v-show="isShow"  >hello2</h1>

    </transition>

  </div>

</template>

<script>

export default {

    name:'Test',

    data(){

        return{

            isShow:true

        }

    }

}

</script>

<style scoped>

h1{

    background-color: orange;

   

}

.hello-enter-active,.hello-leave-active{              /* 进入过程和退出过程 */

  transition: 0.5s linear;

}

.hello-enter,.hello-leave-to{                   /* 进入的起点与离开的终点 */

  transform: translateX(-100%);

}

.hello-enter-to ,.hello-leave{                /*进入的终点与离开的起点*/

  transform: translateX(0);

}

</style>

实现的动画效果与上面的一致

集成第三方库

1.首先需要进行下载

 npm install animate.css --save

2.标签中的name设置为

"animate__animated animate__bounce"  

在Animate.css | A cross-browser library of CSS animations.

中找到合适的动画的名称,进入复制

<template>

  <div>

    <button @click="isShow = !isShow">显示/隐藏</button>

    <transition

          name="animate__animated animate__bounce"        

          appear

          enter-active-class="animate__swing"

          leave-active-class="animate__backOutUp">

      <h1 v-show="isShow">hello3</h1>

    </transition>

  </div>

</template>

<script>

import 'animate.css'; // 确保 animate.css 已经被正确导入

export default {

  name: 'Test',

  data() {

    return {

      isShow: true

    }

  }

}

</script>

<style scoped>

h1 {

  background-color: orange;

}

</style>

<<QQ20241013-152021.mp4>>

关键字:专业外包_宁波妇科医生推荐_网站推广技巧和方法_怎样做公司网站推广

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: