今天進(jìn)行真機(jī)調(diào)試時input的提示詞 placeholder脫離了文檔流,但是奇怪的是input框沒有脫離文檔流
如下圖所示:
微信開發(fā)工具正常:? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?真機(jī):不正常 脫離文檔流
? ? ? ? ? ? ?
解決方法:
<view class="view_input">
<input type="text" placeholder="有話要說,快來評論" >
</view>
?css 加上定位
.view_input{
//.........
input{
background-color: skyblue;
position: relative;
}
input::-webkit-input-placeholder {
position: absolute;
top: 0;
}
}
?效果:
這里記錄一下文章來源:http://www.zghlxwxcb.cn/news/detail-573555.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-573555.html
到了這里,關(guān)于微信小程序input的placeholder脫離文檔流的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!