- 添加Sticky组件实现Header吸顶功能 - 优化轮播图触摸事件,防止与页面滚动冲突 - 调整轮播图容器样式,确保手势操作流畅 - 更新Header组件结构以支持粘性布局 - 修复Banner组件中图片列表的key属性问题 - 移除不必要的状态传递和冗余代码
23 lines
398 B
SCSS
23 lines
398 B
SCSS
.header-bg{
|
|
background: linear-gradient(to bottom, #03605c, #18ae4f);
|
|
height: 335px;
|
|
width: 100%;
|
|
top: 0;
|
|
position: absolute;
|
|
z-index: 0;
|
|
}
|
|
.header-bg2{
|
|
background: linear-gradient(to bottom, #03605c, #18ae4f);
|
|
height: 200px;
|
|
width: 100%;
|
|
top: 0;
|
|
position: absolute;
|
|
z-index: 0;
|
|
}
|
|
|
|
/* 吸顶状态下的样式 */
|
|
.nutui-sticky--fixed {
|
|
.header-bg {
|
|
height: 100%;
|
|
}
|
|
} |