input框中的placeholder属性是可以更改样式,更改的方式为placeholder-class="你的style名"
例如我的:
<view class="top_one">
<text>收货人</text> <input type="text" placeholder="名字"
//(注释)这里---- placeholder_text
placeholder-class="placeholder_text"/>
</view>
<view class="top_two">
<text>手机号码</text><input type="number" placeholder="手机号" />
</view>
.placeholder_text {
font-family: 'Source Han Sans CN';
font-weight: 350;
font-size: 24rpx;
color: #747474;
}
但是这个属性如果使用了<style scoped>就不生效,所以我们可以单独再写一个style:
就ok了 ^q^