91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

在Vue中使用 animate.css 庫

發布時間:2020-08-06 01:39:32 來源:網絡 閱讀:373 作者:梁十八 欄目:web開發

要在class的樣式中加上transform-origin: left center,不然可能會出問題:

<!DOCTYPE?html>
<html>
<head>
????<title></title>
????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
????<script?src="./vue.js"></script>
????<!--?<script?src="http://cdn.staticfile.org/vue/2.6.10/vue.common.dev.js"></script>?-->
????<style?type="text/css">
????????@keyframes?bounce-in?{
????????????0%?{
????????????????transform:?scale(0);
????????????}
????????????50%?{
????????????????transform:?scale(15);
????????????}
????????????100%?{
????????????????transform:?scale(1);
????????????}
????????}
????????.fade-enter-active?{
????????????transform-origin:?left?center;
????????????animation:?bounce-in?1s;
????????}
????????.fade-leave-active?{
????????????transform-origin:?left?center;
????????????animation:?bounce-in?1s?reverse;
????????}
????</style>
</head>
<body>
????<div?id="root">
????????//name隨便取名:
????????<transition?name="fade">
????????????<div?v-show="show">hello</div>
????????</transition>
????????<button?@click="handleClick">切換</button>
????</div>
????<script?type="text/javascript">
????????var?vm?=?new?Vue({
????????????el:?"#root",
????????????data:?{
????????????????show:?true
????????????},
????????????methods:?{
????????????????handleClick:?function()?{
????????????????????this.show?=?!this.show
????????????????}
????????????}
????????});
????</script>
</body>
</html>

當然,還可以自定義style中的class名:

<!DOCTYPE?html>
<html>
<head>
????<title></title>
????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
????<script?src="./vue.js"></script>
????<!--?<script?src="http://cdn.staticfile.org/vue/2.6.10/vue.common.dev.js"></script>?-->
????<style?type="text/css">
????????@keyframes?bounce-in?{
????????????0%?{
????????????????transform:?scale(0);
????????????}
????????????50%?{
????????????????transform:?scale(15);
????????????}
????????????100%?{
????????????????transform:?scale(1);
????????????}
????????}
????????/*.fade-enter-active?{
????????????transform-origin:?left?center;
????????????animation:?bounce-in?1s;
????????}
????????.fade-leave-active?{
????????????transform-origin:?left?center;
????????????animation:?bounce-in?1s?reverse;
????????}*/
????????.haha-active?{
????????????transform-origin:?left?center;
????????????animation:?bounce-in?1s;
????????}
????????.haha-leave?{
????????????transform-origin:?left?center;
????????????animation:?bounce-in?1s?reverse;
????????}

????</style>
</head>
<body>
????<div?id="root">
????????//name隨便取名:
????????<!--?<transition?name="fade">
????????????<div?v-show="show">hello</div>
????????</transition>?-->
????????//自定義class名字:
????????<transition?name="fade"?enter-active-class="haha-active"?leave-active-class="haha-leave">
????????????<div?v-show="show">hello</div>
????????</transition>
????????<button?@click="handleClick">切換</button>
????</div>
????<script?type="text/javascript">
????????var?vm?=?new?Vue({
????????????el:?"#root",
????????????data:?{
????????????????show:?true
????????????},
????????????methods:?{
????????????????handleClick:?function()?{
????????????????????this.show?=?!this.show
????????????????}
????????????}
????????});
????</script>
</body>
</html>

自己命名class名有個好處,可以用別人的動畫。css在這個網址下載:https://daneden.github.io/animate.css/

<!DOCTYPE?html>
<html>
<head>
????<title></title>
????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
????<link?rel="stylesheet"?type="text/css"?href="./animate.css">
????<script?src="./vue.js"></script>
????<!--?<script?src="http://cdn.staticfile.org/vue/2.6.10/vue.common.dev.js"></script>?-->
</head>
<body>
????<div?id="root">
????????//name隨便取名:
????????<!--?<transition?name="fade">
????????????<div?v-show="show">hello</div>
????????</transition>?-->
????????//自定義class名字:
????????<transition?name="fade"?enter-active-class="animated?rubberBand"?leave-active-class="animated?hinge">
????????????<div?v-show="show">hello</div>
????????</transition>
????????<button?@click="handleClick">切換</button>
????</div>
????<script?type="text/javascript">
????????var?vm?=?new?Vue({
????????????el:?"#root",
????????????data:?{
????????????????show:?true
????????????},
????????????methods:?{
????????????????handleClick:?function()?{
????????????????????this.show?=?!this.show
????????????????}
????????????}
????????});
????</script>
</body>
</html>


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

涟源市| 甘肃省| 汝南县| 博客| 昭平县| 武川县| 凌海市| 息烽县| 吕梁市| 揭西县| 澄城县| 福建省| 维西| 申扎县| 凌云县| 聂拉木县| 日喀则市| 宁阳县| 凌海市| 巩留县| 博罗县| 聊城市| 拉萨市| 龙南县| 芒康县| 宝山区| 邹平县| 资中县| 黄浦区| 荆门市| 色达县| 离岛区| 台中市| 台北市| 灵石县| 黄浦区| 康马县| 泉州市| 福鼎市| 漳浦县| 翁牛特旗|