google-chrome - CSS 渐变 - Chrome - 恶心的垂直条纹

标签 google-chrome css

enter image description here

我有这些 CSS 按钮,它们使用 http://www.colorzilla.com/gradient-editor/ 生成的渐变- :hover 状态简单地反转渐变,事件状态添加 top: 1px;

如图所示,“免费试用”按钮的左边缘和“立即购买”按钮的右边缘有一条微弱的垂直条纹。

这仅在 Chrome 中显示(在 Safari 中看起来不错)。有人知道这个问题的修复方法吗?

我在下面有一些 CSS

.big-button {
    width: 120px;
    height: 40px;
    border: none;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
    position: relative;
}
.big-button:hover {
    cursor: pointer;
}
.big-button-wrap .big-button:active {
    top: 7px !important;
}

.big-button.orange {
    background: #fe7d0a; /* Old browsers */
    background: -moz-linear-gradient(top,  #fda11a 0%, #ff6801 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fda11a), color-stop(100%,#ff6801)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #fda11a 0%,#ff6801 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #fda11a 0%,#ff6801 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #fda11a 0%,#ff6801 100%); /* IE10+ */
    background: linear-gradient(top,  #fda11a 0%,#ff6801 100%); /* W3C */
    border: 1px solid #ff6801;
}
.big-button.orange:hover, .big-button.orange:active {
    background: #fe7d0a; /* Old browsers */
    background: -moz-linear-gradient(top,  #ff6801 0%, #fda11a 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff6801), color-stop(100%,#fda11a)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* IE10+ */
    background: linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* W3C */
}

最佳答案

.big-button.orange:hover 添加 border-left:none;>border-right:none; 为绿色删除了 fiddle 中的线条(使用 Chrome)。

这是我的 CSS:

.big-button.orange:hover, .big-button.orange:active {
background: #fe7d0a; /* Old browsers */
background: -moz-linear-gradient(top,  #ff6801 0%, #fda11a 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff6801), color-stop(100%,#fda11a)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* IE10+ */
background: linear-gradient(top,  #ff6801 0%,#fda11a 100%); /* W3C */
border-left:none;

.big-button.green:hover, .big-button.green:active {
background: #6a9a23; /* Old browsers */
background: -moz-linear-gradient(top,  #558711 0%, #8cb941 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#558711), color-stop(100%,#8cb941)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #558711 0%,#8cb941 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #558711 0%,#8cb941 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #558711 0%,#8cb941 100%); /* IE10+ */
background: linear-gradient(top,  #558711 0%,#8cb941 100%); /* W3C */
border-right:none;

}

关于google-chrome - CSS 渐变 - Chrome - 恶心的垂直条纹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9693390/

相关文章:

javascript - Chrome Web Extension,使用按钮在新选项卡中打开网页

google-chrome - bis_skin_checked ="1"是什么意思?使用 chrome 代码源 View 时它显示在我的大部分元素上?

javascript - angular js中禁用div的工具提示

css - 选择 2 个 CSS 类

javascript - 如何阻止或编辑 native 浏览器表单弹出窗口/警报?

javascript - 如何在 Google Chrome 应用程序上发布 JSON?

google-chrome - JS Chrome top.document

html 对象不 float ?

jquery - 光滑的旋转木马图标显示 DOT 和 AT 但没有图标

javascript - 如何使输入值首字母大写?