<style>
button{
line-height:20px;
padding: 10px;
border: none;}
</style>
<button id="btn"></button>在学习button与padding在不同浏览器下兼容性问题,看起来就非常蛋疼,二者组合在不同浏览器下竟然表现出三种高度,解决方法:
<style>
label{
display: inline-block;
line-height: 20px;
padding: 10px;
}
</style>
<button id="btn"></button>
<label for="btn">按钮</label>用label替换掉button进行设置padding,就可以完美解决了!
版权说明:Copyright © 广州松河信息科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州松河信息科技有限公司 版权所有