css修改input框長度的方法:1、在input標簽中利用style屬性設(shè)置width樣式,語法“<input style="width: 寬度值;" />”;2、在style標簽對中,設(shè)置“input{width:寬度值;}”語句即可。
本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。
css修改input框長度的方法
方法1:
利用style屬性給input標簽添加 width樣式。
<input type="text" /><br /><br /> <input type="text" style="width: 300px" />
方法2:
<!DOCTYPE html> <html> <head> <style> .input {width: 100px;} </style> </head> <body> <input type="text" /><br /><br /> <input type="text" class="input" /> </body> </html>
(學習視頻分享:css視頻教程)