html – 如何垂直对齐IE输入框上的文本
发布时间:2020-12-14 19:32:31 所属栏目:资源 来源:网络整理
导读:我有 this代码: input type="text" class="contactInput" value="my string".contactInput{ border:0; margin:0; padding:0; background-color:#000000; color:#ffffff; height:22px; width:290px; padding-left:5px;} 我想垂直对齐它. Firefox和Chrome自动
我有
this代码:
<input type="text" class="contactInput" value="my string"> .contactInput { border:0; margin:0; padding:0; background-color:#000000; color:#ffffff; height:22px; width:290px; padding-left:5px; } 我想垂直对齐它. Firefox和Chrome自动执行(如IE9).与IE8或7是在顶部. 如何使用CSS? 解决方法
假设您的意思是在中心垂直对齐,则可以使用线高CSS属性来执行此操作.简单地将其设置为与元素的高度相同.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |