我试过:
font-size:40%;
但是发现不行
最佳答案
您必须提供输入标签的宽度和高度属性值
<input type="text" style="width: 50px; height: 10px" />
或者你可以为此使用一个类
<style>
.SmallInput { width: 50px; height: 10px; }
</style>
<input type="text" class="SmallInput" />
font-size 只会减小文本框内的字体大小,不会减小文本框的尺寸。
关于html - 如何最小化 <input type ="text"/> 的大小(包括宽度和高度)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1355703/