【发布时间】:2014-04-08 03:50:46
【问题描述】:
我有一个链接,我想让它看起来像一个带有圆角和渐变填充的按钮。它在 Chrome 中运行良好,但在 IE 中不行。
我发现如果我设置 display: inline-block,它会显示渐变,但会删除圆角。有人知道如何在 IE 中解决这个问题吗?
HTML:
<a href="" class="button-gold-med">Hello World</a>
CSS:
a {
color: white;
padding: 8px;
background: #7db9e8;
background: -webkit-gradient(linear, left top, left bottom, from(#7db9e8), to(#1e5799));
background: -webkit-linear-gradient(top, #7db9e8, #1e5799);
background: -moz-linear-gradient(top, #7db9e8, #1e5799);
background: -ms-linear-gradient(top, #7db9e8, #1e5799);
background: -o-linear-gradient(top, #7db9e8, #1e5799);
background: linear-gradient(top, #7db9e8, #1e5799);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7db9e8', endColorstr='#1e5799',GradientType=0);
zoom: 1;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
【问题讨论】:
-
您希望它在哪个版本的 IE 中工作?在 IE10 Consumer Preview 中按原样工作。
-
IE 8 和 9。如果 IE 7 和之前的版本看起来不完全相同,我可以。
标签: css