input内文字垂直居中问题(兼容ie&ff),等待中!

seabell seabell 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<style type="text/css">
<!--
input {
text-align:center;
height:400px;
line-height:400px;
width:200px;
vertical-align:middle;
margin-right: auto;
margin-left: auto;
margin-top: auto;
margin-bottom: auto;
background:url("IMG.JPG") #fff no-repeat center;
}
-->
</style>
<body style="text-align: center">
<input>
</body>

该文本框高度设置为400px,希望其背景图和输入文字都垂直水平居中。而现在在ie里效果正常,在ff中图片正常,input的文字只能水平居中,如何才能垂直也居中?请教!
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
seabell
CSS 61,116 成员 60,701 内容