Html 答:悬停css不起作用

Html 答:悬停css不起作用,html,css,Html,Css,我对一些css有问题。我有两个按钮,一个是href,一个是表单。悬停在表单按钮上起作用,但在href按钮上不起作用 .ims-button, .ims-button a:link, .ims-button a:visited { background-color: rgb(255, 204, 0); border: 1px solid #999; border-radius: 5px; box-shadow: 2px 2px 2px #999999; fo

我对一些css有问题。我有两个按钮,一个是href,一个是表单。悬停在表单按钮上起作用,但在href按钮上不起作用

.ims-button, .ims-button a:link, .ims-button a:visited {
    background-color: rgb(255, 204, 0);
    border: 1px solid #999;
    border-radius: 5px;
    box-shadow: 2px 2px 2px #999999;
    font-family: Ubuntu, Arial, "Arial Unicode MS", Helvetica, sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    padding: 5px;
    vertical-align: middle;
    margin-bottom: 4px;
    margin-left: 4px;
    color: #000000;
    text-decoration: none;
}
.ims-button:hover, a.ims-button:hover, .ims-button a:hover {
    background-color: rgb(255, 204, 0);
    border: 1px solid #999;
    border-radius: 5px;
    box-shadow: none;
    font-family: Ubuntu, Arial, "Arial Unicode MS", Helvetica, sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    padding: 5px;
    margin: 4px 0 0 4px;
    vertical-align: middle;
}
我不明白为什么href不工作

网站: 进入网站后,在带有照片的灰色框下,您可以看到添加到购物车链接-单击该链接,您将看到2个按钮-结帐不起作用,添加到购物篮不起作用


有什么想法吗?

您试图将边距应用于内联(“a”)元素,这是不可能的。将签出链接更改为

display: inline-block; 
你会更接近你的期望


有关内联行为的详细信息,请参阅。

您试图将边距应用于内联(“a”)元素,但这是不可能的。将签出链接更改为

display: inline-block; 
你会更接近你的期望


有关内联行为的更多信息,请参阅。

请减少您在此处发布的css数量,并发布相关的html。大多数人不会跟随你的链接浏览你的源代码。请减少你在这里发布的css数量,并发布相关的html。大多数人不会跟随你的链接浏览你的源代码。在应用
display:inline block
之后还要添加
line height:normal
。在应用
display:inline block
之后还要添加
line height:normal