IE9中的渐变不是四舍五入的

And*_*rei 7 css rounded-corners css3 internet-explorer-9

我创建了一个圆角按钮,在IE9中渐变背景不是圆角的:

方形而不是圆形

这是CSS:

.search button {
    padding: 10px;
    font-family: "OpenSansSemibold", "Helvetica", Arial, sans-serif;
    font-size: 16px;
    display: inline-block;
    outline: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    padding: .5em 2em .55em;
    text-shadow: 0 1px 1px rgba(0,0,0,.3);
    -webkit-border-radius: .5em; 
    -moz-border-radius: .5em;
    border-radius: .5em;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    color: #fef4e9;
    border: solid 1px #da7c0c;
    background: #f78d1d;
    background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
    background: -moz-linear-gradient(top,  #faa51a,  #f47a20);
    filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
}
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

ROF*_*IME 1

从 css 类中删除过滤器样式。

JS 小提琴示例

如果你想要 IE8 及以下版本的渐变,那么你需要创建一个单独的 CSS 文件并将其包装在以下内容中:

<!--[if lte IE 8]>
[css path here]
<![endif]-->
Run Code Online (Sandbox Code Playgroud)

在 IE9 中不能同时使用渐变按钮和圆角按钮。事实上,Twitter 的 Bootstrap 框架将 IE9 按钮降级为带有圆角的纯色背景。