• 【uniapp】小程序中input输入框的placeholder-class不生效以及解决办法


     input框中的placeholder属性是可以更改样式,更改的方式为placeholder-class="你的style名"

    例如我的:

    1. <view class="top_one">
    2. <text>收货人text> <input type="text" placeholder="名字"
    3. //(注释)这里---- placeholder_text
    4. placeholder-class="placeholder_text"/>
    5. view>
    6. <view class="top_two">
    7. <text>手机号码text><input type="number" placeholder="手机号" />
    8. view>
    1. .placeholder_text {
    2. font-family: 'Source Han Sans CN';
    3. font-weight: 350;
    4. font-size: 24rpx;
    5. color: #747474;
    6. }

    但是这个属性如果使用了