微信小程序:placeholder字体大小和颜色设置
2021-07-26 本文已影响0人
我的小小笔尖
- 在页面的wxml文件中定义 placeholder-class="phcolor"
- 在页面的wxss文件中定义 phcolor对应的样式内容
page.wxml
<input class="weui-input" auto-focus placeholder="请输入假名,+空格表示结束" placeholder-class="phcolor" bindinput="bindinputjiaming" />
page.wxss
.phcolor{
color:#aaa;
font-size: 12px;
}