gpt4 book ai didi

html - cordova 中的固定 header

转载 作者:太空宇宙 更新时间:2023-11-04 10:26:39 25 4
gpt4 key购买 nike

我正在尝试将标题固定在顶部,这样如果用户滚动浏览列表,搜索输入字段和标题栏就会保留在屏幕顶部。但是此刻标题随着正文中的内容向上滚动......

这是我的:

<body ng-controller="SearchCtrl" class="animated fadeIn">
<div class="bar bar-header fixed bar-assertive" style="padding-bottom: 20px;">
<a href="index.html"class="button icon-left ion-chevron-left smaller button-clear button-white"></a>
<h1 class="title">Suche</h1>
</div>
<label class="item item-input has-header fixed" style="margin-top: 5px;">
<input type="text" placeholder="Solothurn durchsuchen..." name="text" ng-model="searchBox.storeName">
</label>
<br>

固定类是:

位置:固定;

非常感谢任何帮助!

最佳答案

只是为了测试它,将 !important 添加到您的 css 固定类。您的其他类(class)之一可能正在覆盖/级联它。如果它修复了它,那么您需要在样式表中做一些事情,使 position: fixed 规则优先于正在应用的其他位置规则,这样您就可以删除 !important 因为如果 CSS 第一次正确级联,它会更干净、更轻便。

关于html - cordova 中的固定 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36728975/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com