我遇到了一个很奇葩的现象:
<style>
.input_style_2{
width: 28px;
height:28px;
margin: 0px 2px;
border: none;
background: #f4f4f4;
line-height: 24px;
text-align: center;
}
</style>
<body>
<input type="button" class=input_style_2 value="-" />
<input type="text" class=input_style_2 value="2" />
<input type="button" class=input_style_2 value="+" />
</body>
这样的3个按钮,在网页上显示是这样的
但是在手机上显示却是这样的
为什么同样的css,button和text的大小不一样呢
不同的浏览器默认样式不一样各种坑,所以才会有reset 和 normalize.css,你这里可以是默认的padding不一样。