微信小程序 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;
}
"
展开全部
收起
1回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • VVV

    12人对此回答表示赞同

    input中width指定百分比。我的情况是,我在iphone ios测过是无效的,要指定大小才生效。

    你看你是不是这个问题?

    展开
    12
    0回复
    发布于 5年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部