您现在的位置是:首页 >

input怎么设置输入长度 如何设置html中input宽度

火烧 2022-11-19 12:10:24 1082
如何设置html中i ut宽度 解决方案1: lt i ut ame= ty e=text ize="15" gt 或 lt i ut ame= ty e=text ize="15" cla ="自己

如何设置html中input宽度  

解决方案1:

<input name= type=text size="15" >

<input name= type=text size="15" class="自己起名字"/>

CSS中

<style>

.自己起的名字{

wdith:**;

height:**;

}

</style>

解决方案2:

加上 >

<input name= type=text size="15" >

就是说宽为100像素,高为50像素

的样式在body 定义

追问:

如何在css中设置,可以在CSS中设置么?

比如 input { width:10px;height:20px}

解决方案3:

如果input框的type值是text,则是单行文本框,maxlength属性是设置能填多少字符,size是可以看见多少字符,要想改变input框的样式可以利用CSS实现,比如可以改变它的背景和边框当然还有宽度高度

解决方案4:

style='height:20px; width:50px;'

解决方案5:

<input name= type=text >

解决方案6:

方法1:

设置高度属性:height

设置宽度属性:width

方法2:

设置样式属性:style

input怎么设置输入长度 如何设置html中input宽度

语法:

<input name= type=text size="15" >

注:px代表像素!

  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码