placeholder="? Write YourComment Here" 想讓這個提示語靠廣本框上端,怎么辦?
6 回答

碼農2號
TA貢獻151條經驗 獲得超48個贊
給input::webkit-input-placeholder{設置屬性}
????????::-moz-placeholder{兼容火狐firefox19+}
????????:-moz-placeholder{兼容火狐firefox18以下}
????????:-ms-input-placeholder{兼容ie10以上}
2.使用其他方法:
????????透明的input下面放個span,內容寫placeholder內容,input獲取焦點時候,span隱藏或其內容影藏。

什么鬼_呀你
TA貢獻46條經驗 獲得超35個贊
<!DOCTYPE html>
<html>
? <body>
????? <input type="text" placeholder="文字靠上" style="padding-bottom:100px;padding-left:300px;font-size:30px;"/>
? </body>
</html>
- 6 回答
- 1 關注
- 3395 瀏覽
添加回答
舉報
0/150
提交
取消