gpt4 book ai didi

html -

转载 作者:太空宇宙 更新时间:2023-11-04 00:07:26 25 4
gpt4 key购买 nike

该按钮比具有相同样式的 a 标签大 2px。有什么想法为什么要这样做以及如何解决吗?

jsfiddle

<a href="">Some Text</a>
<button> Some Text</button>

a, button {
background-color: red;
border: none;
text-decoration: none;
font-size: 14px;
line-height: 14px;
font-family: Verdana;
display: inline-block;
color:black;
padding:0;
}

最佳答案

按钮有填充。在按钮上设置 padding : 0;,它们看起来是一样的

Firefox 有它自己的东西......尝试添加以下内容:

button::-moz-focus-inner { 
border: 0;
padding: 0;
}

关于html - <button> 和 <a> 似乎有不同的行高,如何绕过它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14391185/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com