加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

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属性来执行此操作.简单地将其设置为与元素的高度相同.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读