style(footer): 页脚改为内容流最底部,取消 position:fixed
- 去掉 position/left/right/bottom/z-index/pointer-events,改为 static 常规流 - 保留 margin-top:40px、padding-bottom:22px、单行横排居中(text-align:center + nowrap) - 验证:滚到顶时 top=1217 不在视口内(不悬浮);页脚底1257/滚动区1283=流内最后元素; 单行(三段top均1219)、居中偏移-7px;滚到底距视口底26px、距右下角火箭367px无重叠
This commit is contained in:
1 parent
fc70d22929
commit
9e0c38f23b
2 files changed
+15
-8
No files matched your search
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
|
||||
## Version 2026.10.14-it-tools-pro
|
||||
|
||||
### 🦶 页脚改为内容流最底部(取消固定)
|
||||
- **上一版**:`position: fixed` + `left:0; right:0; bottom:12` 贴住视口底部,**浮在内容之上**
|
||||
- **现在**:改为**常规流内元素**(`position: static`),排在页面内容**最末尾**,随内容滚动
|
||||
- 去掉 `position/left/right/bottom/z-index/pointer-events`
|
||||
- 保留 `margin-top: 40px`(与上方内容拉开)、`padding-bottom: 22px`、单行横排居中(`text-align:center; white-space:nowrap`)
|
||||
- **验证(首页,滚动区 1283px)**:
|
||||
- `position: static` ✓;滚到顶时页脚在视口下方 `top=1217`(不在视口内,说明不悬浮)
|
||||
- 页脚底 1257 / 滚动区总高 1283 → 其下仅剩自身 padding,是**流内最后一个元素**(其后只有 `back-top`,而它是 `fixed` 不占流)
|
||||
- 单行 ✓(三段 `top` 均为 1219)、居中偏移 −7px
|
||||
- 滚到底时距视口底 26px 可见;文字右缘距右下角火箭 **367px** 无重叠
|
||||
- 视觉核验:内容最后部分、无遮罩压盖
|
||||
|
||||
### 🦶 页脚改为底部居中单行横排
|
||||
- **上一版**:`position: fixed` 贴**右下角**、两行竖排(`© 年份` / `🚀 链接` 上下叠放)
|
||||
- **现在**:改为**单行横排、水平居中**贴住视口底部
|
||||
|
||||
@@ -228,19 +228,15 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部居中固定页脚:单行横排,贴住视口底部中线,滚动不跟随 */
|
||||
/* 页脚:置于页面内容最底部(不固定、随内容滚动),单行横排居中 */
|
||||
.footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 12px;
|
||||
z-index: 350;
|
||||
margin-top: 40px;
|
||||
padding: 0 0 22px;
|
||||
text-align: center;
|
||||
color: #838587;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
white-space: nowrap; // 强制单行,不折行
|
||||
pointer-events: none; // 不拦截下方内容点击,仅链接可点
|
||||
user-select: none;
|
||||
|
||||
.footer-sep {
|
||||
@@ -249,7 +245,6 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
|
||||
:deep(a) {
|
||||
pointer-events: auto;
|
||||
color: #838587;
|
||||
text-decoration: none;
|
||||
|
||||
|
||||
Reference in new issue
Block a user