Input type “number” won't resize

后端 未结 7 1601
面向向阳花
面向向阳花 2020-12-13 05:45

Why won\'t my input resize when I change the type to type=\"number\" but it works with type=\"text\"?

EXAMPLE

    Email: &l         


        
7条回答
  •  难免孤独
    2020-12-13 06:04

    Seem like the input type number does not support size attribute or it's not compatible along browsers, you can set it through CSS instead:

    input[type=number]{
        width: 80px;
    } 
    

    Updated Fiddle

提交回复
热议问题