今天做小程序遇到,文本框后被弹起的键盘遮住了一部分区域。查了一下小程序官网api在找到的解决方法。

场景如下:图二是解决后的界面

代码:

 cursor-spacing="20"

 <view class='pwd' catchtap='openfix'>
      <input type='password' bindinput='inputpwd' placeholder='管理员操作密码' focus='{{focuspwd}}' maxlength='6' cursor-spacing="20"></input>
      <button bindtap='tocash'>确定</button>
    </view>

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐