gpt4 book ai didi

ionic-framework - ionic View 在浏览器和模拟器中是不同的

转载 作者:行者123 更新时间:2023-12-04 06:58:31 25 4
gpt4 key购买 nike

我设计了一个应用程序,但在浏览器和模拟器上运行时,子标题下方搜索框的位置有所不同。知道为什么会这样吗? App on emulator App on browser

HTML 模板

<ion-header-bar style="color: black; border-bottom: 2px solid #ed1b24 "class="bar bar-light bar-subheader">
<div class="title">
Home
</div>

<div class="buttons">
<button style="color: #ed1b24;" class="button button-icon icon ion-ios-shuffle-strong" ng-click="isClick=!isClick"></button>
</div>

</ion-header-bar>

<div class="fixed-header my-video" >
<label class="item-input-wrapper search-box-label">
<input type="text" placeholder="Search" ng-model="search">
</label>
</div>
<ion-content class="ion-content-below-my-video has-footer">.....

CSS

.fixed-header{
margin-top: 88px;
/* @in height,
put your content below the header bar.
*/
}

.my-video
{
width: 100%;
position: absolute;
background: #ed1b24;
color: red;
text-align: center;
padding: 5px;
}

.ion-content-below-my-video{
margin-top: 40px!important;
}

最佳答案

看起来像是 iOS WebView 和您的浏览器之间的 CSS 差异。

您不应使用自定义输入字段进行搜索,强烈建议使用现有的 <ion-searchbar> 元素。

还要确保您的模拟器中运行的不是非常旧的 iOS 版本。考虑捆绑 WKWebview 如果您还没有进入您的应用程序。 iOS 应用程序,尤其是旧设备上的应用程序,从中受益匪浅,尽管它会显着增加您的 cordova 构建包大小。

关于ionic-framework - ionic View 在浏览器和模拟器中是不同的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44412676/

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