小程序设置了个搜索框的title头高度固定。但是手机上下拉的时候高度会变
发布于 6 年前 作者 xiulan39 11025 次浏览 来自 问答

如题,这个是代码,请问是要修改什么CSS还是调用什么方法才能让他下拉的时候高度不变吗:

<view class=“head”>

<view class=“back”>取消</view>

<input class=“search-content” placeholder=“目的的” focus/>

<icon type=“search” size=“20” color="#ff7700" />

</view>

.head{

background-color: #fff;

position: fixed;

padding: 15rpx;

display: flex;

flex-direction: row;

justify-content:space-around;

align-items:center;/*垂直居中*/

width: 96%;

height: 60rpx;

top:0;

}

.search-content{

background-color: #f1f1f1;

width: 75%;

border-radius: 8rpx;

padding-left: 15rpx;

height: 60rpx;

margin:0 20rpx;

}

.back{

color: #ff7700;

font-size: 30rpx;

}

1 回复

请勿重复发帖,此贴先隐藏

回到顶部