css - input设置height:20px;但是实际高度为25px是为什么?不管设置多高,都会大于5px.
本文介绍了css - input设置height:20px;但是实际高度为25px是为什么?不管设置多高,都会大于5px.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
*{
padding: 0;
margin: 0;
clear: both;
}
.container{
width: 100%;
}
.header{
width: 100%;
height: 60px;
background-color: #2189c0;
background-image: url(../imgs/task_9.png);
background-repeat:no-repeat;
padding: 0 50px;
background-origin: content-box;
background-position: center left;
position: relative;
}
.header input{
width: 300px;
height: 20px;
解决方案
在你的*{padding: 0;margin: 0;clear: both;}
加多一个border:none;
试试,我猜应该是还有默认的border
这篇关于css - input设置height:20px;但是实际高度为25px是为什么?不管设置多高,都会大于5px.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文