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

textarea设置fixed样式,placeholder中文字跟随背景移动

问题模块 框架类型 问题类型 操作系统 操作系统版本 手机型号 微信版本
客户端 小程序 Bug iOS IOS9.2 iphone 6 plus 6.7.1

- 当前 Bug 的表现(可附上截图)

当弹层为fixed属性时,textarea 中添加placeholder 标签属性拖动背景层移动,这时placeholder中的文字会跟随背景移动

中的文字会跟随背景移动- 预期表现
中的文字会跟随背景移动- 预期表现


- 预期表现


- 复现路径


- 提供一个最简复现


wxml

<view class='pinlunpop' wx:if="{{helpshow}}">

<view class='con'>

<view class='tit'>{{helinfotit}}</view>

<textarea class='txtr' bindinput="bindTextAreaBlur" placeholder='最多输入200字' maxlength='200' placeholder-class='txtrpl' focus='{{helpshow}}'></textarea>

<view class='btns flex'>

<view class='btn flex_tel' bindtap='closepinl'>取消</view>

<view class='btn flex_tel btnn' bindtap='pinlun'>确定</view>

</view>

</view>

</view>

wxss

.pinlunpop{width: 100%;height: 100%;position: fixed;left: 0;top:0;background-color: rgba(0, 0, 0, 0.5);z-index:9;}

.pinlunpop .con{width: 600rpx;height: 430rpx;margin: 0 auto;margin-top: 40%;background-color: #ffffff;border-radius: 20rpx;padding: 25rpx;}

.pinlunpop .con .tit{width: 100%;height: 40rpx;line-height: 40rpx;padding-left: 25rpx;font-size: 30rpx;color: #333333;margin-bottom: 20rpx;}

.pinlunpop .con .txtrbox{width: 100%;height: 240rpx;border: 1px solid #efefef;border-radius: 8rpx;position: relative;}

.pinlunpop .con .txtr{width: 100%;height: 240rpx;border: 0;resize: none;padding: 20rpx;font-size: 30rpx;color: #333333;}

.pinlunpop .con .txtbnum{position: absolute;left: 0;top: 0;font-size: 30rpx;color: #999999;}

.pinlunpop .con .txtrpl{font-size: 28rpx;}

.pinlunpop .con .btns{width: 100%;height: 80rpx;margin-top: 10rpx;}

.pinlunpop .con .btns .btn{height: 70rpx;border-radius: 8rpx;text-align: center;line-height: 70rpx;font-size: 30rpx;color: #999999;border: 1px solid #f7f7f7;margin: 0 6rpx;}

.pinlunpop .con .btns .btnn{color: #41d170;border: 1px solid #41d170;}


网友回复

凌云摘星傲苍穹:

你给出来的这段代码并不能拖动背景,没办法复现你说的情况……能不能麻烦给个相关的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)?

评论 抢沙发

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

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

云免签H5支付