https://jingyan.baidu.com/article/59a015e3042dabf7948865c9.html

1、input框文本域长度可以使用对应的css样式进行调试,不能有大写字母。

第一种为width属性,设置input框的宽度,可以按照百分比和px长度设置。

python input最大长度 input设置最大长度_html

 

2、

第二种为通过style属性设置,给input框设置style属性,属性值为width:20%;

style="width:20%";

python input最大长度 input设置最大长度_css_02

3、通过css设置

<style type="text/css">
        .text {
            border: #CCCCCC 1px solid;
            height: 20px;
            width:20px;
        }
    </style>