微信小程序 input标签password模式,在安卓手机上placeholder中的内容也被隐藏了
模拟器中input标签位置是居中的,未设置margin-left,在iphone上显示的是顶在最左面,但是在android手机上是居中的。在iphone手机上margin的设置基本无效,为什么?
代码如下:
<view class="container">
<input class="common-input" placeholder="请输入邮箱" bindinput="dataForUsername" value="{{username}}" auto-focus />
<view class="verificationCode-view">
<input class="verificationCode-input" placeholder="验证码" bindinput="dataForVerificationCode" value="{{verificationCode}}" />
<button type="primary" class="sendVerificationCodeBtn" bindtap="doSenVercode">验证码</button>
</view>
<button type="primary" class="common-submitBtn" bindtap="doFindPwd">找回密码</button>
</view>
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
.common-input{
width:80%;
height:92rpx;
border: 1px solid #d9d9d9;
/*padding: 10rpx;*/
border-radius: 3px;
}
.common-submitBtn{
margin-top:30rpx;
width:80%;
}
.verificationCode-view{
width: 80%;
}
.verificationCode-input{
width:50%;
height:92rpx;
border: 1px solid #d9d9d9;
border-radius: 3px;
margin-top: 25rpx;
float: left;
}
.sendVerificationCodeBtn{
width:45%;
float:right;
margin-top: 25rpx;
}