想給input為text的單獨設置樣式,怎么選擇
1 回答
已采納

小呀么小二郎呀
TA貢獻22條經(jīng)驗 獲得超38個贊
<!DOCTYPE?html> <html> <head> <style> input[type="text"] { ??width:150px; ??display:block; ??margin-bottom:10px; ??background-color:yellow; ??font-family:?Verdana,?Arial; } input[type="button"] { ??width:120px; ??margin-left:35px; ??display:block; ??font-family:?Verdana,?Arial; } </style> </head> <body> <form?name="input"?action=""?method="get"> <input?type="text"?name="Name"?value="Bill"?size="20"> <input?type="text"?name="Name"?value="Gates"?size="20"> <input?type="button"?value="Example?Button"> </form> </body> </html>
關鍵代碼:input[type="text"]
添加回答
舉報
0/150
提交
取消