微信小程序怎么实现组件悬浮?

发布于 7 年前作者 vhu13969 次浏览最后编辑 7 年前来自 ask

我想在页面顶部实现一个搜索框,在上下滑动时,搜索框始终悬浮显示在页面顶部,翻了好久的API文档,跪求怎么实现?

2 回复
guiyingzhao
guiyingzhao1 楼6 年前

很好

uxiong
uxiong2 楼5 年前

position: fix;

z-index: 11;