html52.com
我爱小程序-开发者交流社区

小程序设置了个搜索框的title头高度固定。但是手机上下拉的时候高度会变

如题,这个是代码,请问是要修改什么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;

}


评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付