简体   繁体   English

如何放大输入栏?

[英]How to enlarge input bar?

How to enlarge input number type form like the text form. 如何像文本形式一样放大输入数字类型的形式。 The minimum and maximum number property is crucial. 最小和最大数量属性至关重要。

 input[type=text] { width: 40%; padding: 12px 20px; margin: 8px 0; box-sizing: border-box; border: 3px solid #ccc; -webkit-transition: 0.5s; transition: 0.5s; outline: none; Font-size: 26px; } 
 Input number: <input type="number" name="quantity" min="1" max="5000"> <br><br> Input Form: <input type="text" name="firstname" value="This is big"> 

you need to use this input[type=number] to apply code to enlarge input number type 您需要使用此input[type=number]来应用代码以扩大输入数字的类型

 input[type=number] { width: 40%; padding: 12px 20px; margin: 8px 0; box-sizing: border-box; border: 3px solid #ccc; -webkit-transition: 0.5s; transition: 0.5s; outline: none; Font-size: 26px; } 
 Input number: <input type="number" name="quantity" min="1" max="5000"> 

Well you could make that style to be applied to a class, bigInput for example: 好吧,您可以将该样式应用于例如bigInput的类:

.bigInput {
    width: 40%;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
    border: 3px solid #ccc;
    -webkit-transition: 0.5s;
    transition: 0.5s;
    outline: none;
    font-size: 26px;
}

Then all you have to do is attach the bigInput class to all the input fields that need to have this style: 然后,您要做的就是将bigInput类附加到所有需要具有此样式的输入字段:

Input number:
<input type="number" name="quantity" min="1" max="5000" class="bigInput">

<br><br> Input Form:
<input type="text" name="firstname" value="This is big" class="bigInput">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM