我在 IE7/8 上将 CSS3 PIE 用于圆 Angular 和 anchor 按钮的渐变背景。在 IE8 上,PIE 仅适用于圆 Angular ,但不会出现渐变颜色,只会渲染具有 1px 圆 Angular 边框的按钮。只有当我在模式中使用这个按钮时,我才会面临这个问题。
a.button {
border: 1px solid #238cbf;
cursor: pointer;
background-color: #3a98c4;
background-image: -webkit-gradient(linear, top, bottom, from(#3a98c4), to(#047ab8));
background-image: -webkit-linear-gradient( top, #3a98c4, #047ab8);
background-image: -moz-linear-gradient( top, #3a98c4, #047ab8);
background-image: -ms-linear-gradient( top, #3a98c4, #047ab8);
border-radius: 4px; /* Opera 10.5,
box-shadow: 0 1px 1px #444; /* Opera 10.5, IE9, FF4+, Chrome 10+ */
color: #fff;
font-size: 12px;
display: inline-block;
}
a.button {
-pie-background: linear-gradient(#3a98c4, #047ab8);
-ms-behavior: url(/pie/PIE.htc);
}
我尝试应用 position:relative 和 z-index 但没有任何帮助。
最佳答案
-ms-behavior: url(/pie/PIE.htc);
以上是错误的
宁愿尝试下面。
behavior: url(/pie/PIE.htc);
将它与其他属性一起添加到 a.button
。
如果问题仍然存在,请查看此 answer .
这可能会有帮助。
关于css - PIE 未应用于 IE8 中的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18187899/