css修改input框長(zhǎng)度的方法:1、在input標(biāo)簽中利用style屬性設(shè)置width樣式,語(yǔ)法“<input style="width: 寬度值;" />”;2、在style標(biāo)簽對(duì)中,設(shè)置“input{width:寬度值;}”語(yǔ)句即可。
本教程操作環(huán)境:windows7系統(tǒng)、CSS3&&HTML5版、Dell G3電腦。
css修改input框長(zhǎng)度的方法
方法1:
利用style屬性給input標(biāo)簽添加 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>
(學(xué)習(xí)視頻分享:css視頻教程)