feat: 会员中心全局页面跳转过渡动画
All checks were successful
continuous-integration/drone/push Build is passing

header.php: CSS 入场动画(fadeIn + translateY)
footer.php: JS 拦截链接点击,先淡出再跳转
- 入场: 0.35s 从下方8px渐显
- 离场: 0.25s 向上8px渐隐
- 跳过: 锚点/javascript:/新窗口/修饰键
This commit is contained in:
yiqiu
2026-03-19 18:48:39 +08:00
parent 89a60864dc
commit 3e2939463c
2 changed files with 35 additions and 0 deletions

View File

@@ -17,6 +17,24 @@
<!-- 模板样式 -->
<link rel="stylesheet" href="/{$template_catalog}/template/{$public_themes}/css/common/reset.css">
<!-- 页面过渡动画 -->
<style>
body {
animation: pageEnter 0.35s ease both;
}
body.page-leaving {
animation: pageLeave 0.25s ease both;
}
@keyframes pageEnter {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes pageLeave {
from { opacity: 1; transform: translateY(0); }
to { opacity: 0; transform: translateY(-8px); }
}
</style>
<script src="/{$template_catalog}/template/{$themes}/theme/index.js"></script>
<link rel="stylesheet" href="/{$template_catalog}/template/{$public_themes}/css/common/common.css">