internet-explorer - 为什么我的绿色按钮在 IE 中显示为白色?

标签 internet-explorer css

我有一个绿色按钮,我已经为它生成了这个 css:

.lime_button {
    -moz-box-shadow:inset 0px 1px 0px 0px #d9fbbe;
    -webkit-box-shadow:inset 0px 1px 0px 0px #d9fbbe;
    box-shadow:inset 0px 1px 0px 0px #d9fbbe;
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #b8e356), color-stop(1, #a5bb52));
    background:-moz-linear-gradient(center top, #b8e356 5%, #a5bb52 100%);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b8e356', endColorstr='#a5bb52');
    background-image: -moz-linear-gradient(top, #b8e356 0%, #a5bb52 100%);
    background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#B8E356), to(#A5BB52));
    background-color:#b8356;
    -webkit-border-top-left-radius:0px;
    -moz-border-radius-topleft:0px;
    border-top-left-radius:0px;
    -webkit-border-top-right-radius:0px;
    -moz-border-radius-topright:0px;
    border-top-right-radius:0px;
    -webkit-border-bottom-right-radius:0px;
    -moz-border-radius-bottomright:0px;
    border-bottom-right-radius:0px;
    -webkit-border-bottom-left-radius:0px;
    -moz-border-radius-bottomleft:0px;
    border-bottom-left-radius:0px;
    text-indent:0;
    display:inline-block;
    color:#ffffff;
    font-family:Arial;
    font-size:17px;
    font-weight:bold;
    font-style:normal;
    height:50px;
    line-height:50px;
    width:300px;
    text-decoration:none;
    text-align:center;
    text-shadow:1px 1px 0px #86ae47;
}
.lime_button:hover {
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #a5cc52), color-stop(1, #b8e356));
    background:-moz-linear-gradient(center top, #a5cc52 5%, #b8e356 100%);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#a5cc52', endColorstr='#b8e356');
    background-color:#a5cc52;
}
.lime_button:active {
    position:relative;
    top:1px;
}

Chrome 中看起来不错:

Chrome rendering

但在 IE10 中显示为白色:

IE10 rendering

最佳答案

您似乎在使用 IE10,它使用 linear-gradient 而不是 filter

background-image: linear-gradient(to bottom, #B8E356,#A5BB52);

应该这样做。

关于internet-explorer - 为什么我的绿色按钮在 IE 中显示为白色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19120240/

相关文章:

html - Internet Explorer 在 textareas 中包装的单词与 div 不同

css - 如何在 angular-schema-form 模式而不是表单中设置表单元素的样式?

css - "star rating"CSS 错误让我抓狂

javascript - 对方法或属性访问的意外调用。微软客户关系管理

jquery - IE站点导航页面闪烁

java - WebDriver 和 IE10 输入非常慢

html - 如何为h :selectManyListbox设置边框和滚动条颜色

html - <button class ="button"> 标签 vs <div class ="button">

jquery - Wordpress jquery 选择一个子菜单项?

javascript - DOM 更新时相对定位的元素不会移动(IE6 和 IE7)