gpt4 book ai didi

html - 相同样式的 anchor 元素和输入元素的填充差异

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

我有下一个输入和 anchor 元素:

<input type="submit" class="button" name="add" value="Button 1" />
<a class="button" href="cpanel.php">Button 2</a>

CSS 是:

 input, textarea, select, button 
{font-size: 100%;font-family: inherit;margin:0;padding:0;}

.button{
border: 1px solid #9B9B9B;
background-color: #DADADA;
padding: 0;
margin: 0 20px 5px 0;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-khtml-border-radius: 5px;
cursor: pointer;
}

问题是 firefox 显示两个具有不同填充的按钮:

enter image description here

我使用了重置的 css 代码,并在正文中定义了一个行高属性。

谢谢。

最佳答案

尝试:

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

关于html - 相同样式的 anchor 元素和输入元素的填充差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8818650/

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