如何在CSS中设置输入(文本)字段的高度? [英] How to set the height of an input (text) field in CSS?
本文介绍了如何在CSS中设置输入(文本)字段的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有CSS代码,应该设置我的文本框的高度。我使用VS2010 Express for Windows手机,编码为HTML / CSS / Javascript / C#。
< input class =heighttexttype =textid =name>
CSS
.heighttext {
height:30px
}
我可以将高度设置为任何我喜欢的,但文本框将保持不变!
请帮助,或至少给我一个链接,可以!
解决方案
尝试 padding
和 line-height
-
input [type =text] {padding:20px 10px; line-height:28px; }
Sorry for this question but I can't seem to find an answer anywhere. I have CSS code that should set the height of my text box. I am using VS2010 Express for Windows phone, coding in HTML/CSS/Javascript/C#.
HTML
<input class="heighttext" type="text" id="name">
CSS
.heighttext{
height:30px
}
I can set the height to anything I like, but the text box will stay the same! Please help, or at least send me a link that can!
解决方案
Try with padding
and line-height
-
input[type="text"]{ padding: 20px 10px; line-height: 28px; }
这篇关于如何在CSS中设置输入(文本)字段的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文