網站首頁 編程語言 正文
提示:繼el-tab 切換時添加動畫_CMDN哈哈哈哈哈的博客-CSDN博客之后。
目錄
1. 需求:
2.?解決方法:
1.?先寫動畫樣式
?2.? 設類名
?3.?在data?里面定義inAnimation?
?4.?在methods?寫方法
1. 需求:
點擊按鈕,在跳轉路由之前,先觸發動畫,動畫完成之后移除樣式
2.?解決方法:
1.?先寫動畫樣式
? ?之所以吧anim和gzindex寫在一起,是為了切換動畫時頁面有樣式。
//頁面一進來加載
.GZindex,.Anim {
animation: zoomIn 1.5s 0.02s ease backwards;
background: url("../../assets/imgList/GZIndexBG.jpg") no-repeat;
height: 100%;
background-position: center;
width: 100%;
background-size: 100% 100%;
position: fixed;
}
//觸發事件后加載
.Anim {
animation: zoomOut 1.5s 0.02s ease backwards;
/* animate__zoomOut */
}
?2.? 設類名
gzindex :頁面樣式
anim:?動畫?
想法:通過判斷inAnimation來決定是觸發哪個類
?3.?在data?里面定義inAnimation?
export default {
name: 'GZIndex',
data () {
return {
inAnimation:true
}
}
}
?4.?在methods?寫方法
在需要觸發動畫的事件中給inAnimation賦值即可
(點擊按鈕,調用方法,在方法里給inAnimation?賦值)
原文鏈接:https://blog.csdn.net/CMDN123456/article/details/130337710
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2022-12-06 Python基礎面向對象之繼承與派生詳解_python
- 2022-05-29 Linux系統通過Docker安裝SQL?Server數據庫_docker
- 2022-04-23 簡單易懂的二叉樹詳解,你確定不來看看嗎
- 2022-11-23 Python?os.listdir與os.walk實現獲取路徑詳解_python
- 2023-03-19 教你如何實現在react項目中嵌入Blazor_React
- 2022-04-22 VSCode中git上傳遇到 “在簽出前,請清理存儲庫工作樹。”問題解決
- 2022-08-02 Android中TextView自動適配文本大小的幾種解決方案_Android
- 2021-12-01 CentOS7?防火墻(firewall)的操作命令大全_Linux
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支