css 样式 <button> 显示灰色背景

标签 css button

我正在设计一些样式,我的添加到购物车按钮看起来不错,但我正在尝试为我的愿望 list 创建圆形按钮,但我仍然看到它们后面是灰色的。我认为这可能是浏览器的默认样式接管,但我不确定,有没有人见过这样的事情?

较大的“添加到购物车”按钮看起来很完美。太奇怪了,这是我的代码和图片

.button {
    color: #fff;
    background: #a4cd45;
    border: 1px solid #8bb43f;
    padding: 10px 20px;
    font-size: 135%;
    margin: 0 auto;
    transition: background 0.2s cubic-bezier(0.86, 0, 0.07, 1);
    border-radius: 4px
}
a.button:hover {
    background: #8B0204;
    border-color: #8B0204;
    color: white
}
.wishlist {
    height: 40px;
    width: 40px;
    line-height: 40px;
    border-radius: 40px;
    color: white;
    background-color: #a4cd45;
    text-align: center;
    margin: 17px 10px 0 0;
    position: relative;
    z-index: 2;
    font-size: 90%;
    cursor: pointer;
    float:right
}

enter image description here

最佳答案

.wishlist

插入:

border:0;

如果你想让它消失。

P.S:您有 border: 1px solid #8bb43f; 用于另一个按钮,这也适用于此!

JSFiddle

关于css 样式 <button> 显示灰色背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24482540/

相关文章:

CSS 与 ASP.NET 表格控件冲突

html - 在一系列内联元素中缩小中间 div 的宽度

android - Froyo 上的按钮突出显示行为发生了变化?

javascript - 显示 javascript 函数的值

vba - 取消按钮进行选择而不是取消

html - css 按钮未显示在任何版本的 IE 中

html - 根据 DOCTYPE 呈现不同的 HTML(图像)

html - 如何将列表项中的文本和子行居中?

html - CSS 表格矩阵上的边框样式,无需额外的类

cocoa-touch - iOS:按钮的非方形点击区域