Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Firefox按钮CSS问题_Html_Css_Firefox - Fatal编程技术网

Html Firefox按钮CSS问题

Html Firefox按钮CSS问题,html,css,firefox,Html,Css,Firefox,我正在尝试为CSS中的按钮编写样式。css代码: .btn{ border: solid 1px rgba(210, 210, 210, 0.69); outline: none; color: black; background-color: #E8E8E8; font-family: Verdana, sans-serif; cursor: pointer; margin: 2px; display: inline-block;

我正在尝试为CSS中的按钮编写样式。css代码:

.btn{
    border: solid 1px rgba(210, 210, 210, 0.69);
    outline: none;
    color: black;
    background-color: #E8E8E8;
    font-family: Verdana, sans-serif;
    cursor: pointer;
    margin: 2px;
    display: inline-block;
    text-indent: 0;
    font-style: normal;
    font-size: 12px;
    padding: 3px 7px;
}
这对于输入标记和a标记非常有效

<input type='submit' class='btn'>
<button class='btn'>Submit</button>

提交
问题在于标签

<a href='#' class='btn'>Submit</a>

在chrome和safari中,它工作得很好,但在firefox中,大小是关闭的,我如何解决这个问题


这里有一个JSBin可以帮助您:

因为这个问题只发生在FireFox中,所以应该为FF使用一个查询选择器,并增加填充。我也删除了文字装饰,但这取决于你

@-moz-document url-prefix() { 
  a.btn {
     padding: 4px 7px
  }
}

尝试将此添加到css中:

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