1
This commit is contained in:
@@ -81,22 +81,54 @@
|
||||
background-color: #FAFAFA;
|
||||
font-family: "PingFang SC";
|
||||
transition: padding-top 0.3s ease-in-out; // 添加过渡动画,让布局变化更平滑
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - var(--status-bar-height, 0px) - var(--nav-bar-height, 0px) - 112px); // 减去底部导航栏高度 112px
|
||||
overflow: hidden;
|
||||
|
||||
.listTopSearchWrapper {
|
||||
padding: 0 15px;
|
||||
.fixedHeader {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.listTopSearchWrapper {
|
||||
background-color: #fff;
|
||||
// 使用 margin-top 负值来控制可见性,保持元素高度不变,筛选项位置固定
|
||||
transition: margin-top 0.25s cubic-bezier(0.4, 0, 0.2, 1),
|
||||
opacity 0.2s ease-out;
|
||||
padding: 10px 15px 10px 15px; // 统一边距:上下10px 左右15px
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
will-change: margin-top, opacity;
|
||||
|
||||
&.show {
|
||||
opacity: 1;
|
||||
margin-top: 0; // 正常显示
|
||||
}
|
||||
|
||||
&.hide {
|
||||
opacity: 0;
|
||||
margin-top: -64px; // 使用负 margin 向上隐藏,但仍占据布局空间 (44px内容 + 20px padding = 64px)
|
||||
pointer-events: none; // 隐藏时禁用交互
|
||||
}
|
||||
}
|
||||
|
||||
.listTopFilterWrapper {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding: 0 15px 10px 15px; // 上0 左右15px 下10px(与搜索框左右对齐,下边距一致)
|
||||
gap: 5px;
|
||||
position: sticky;
|
||||
background-color: #fff;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.listScrollView {
|
||||
flex: 1;
|
||||
height: 0; // 让 flex 生效
|
||||
}
|
||||
|
||||
.menuFilter {
|
||||
|
||||
Reference in New Issue
Block a user