【发布时间】:2019-03-21 20:58:10
【问题描述】:
我已经按照 CSS sn-p 准备了一个橡皮图章效果,该效果在 Google chrome、Firefox 中运行良好,但在 IE 11 中运行良好。 知道我在这里犯了什么错误。在 IE11 中它看起来是黑色的。
.stamp {
position: relative;
display: inline-block;
color: red;
padding: 15px;
background-color: white;
box-shadow:inset 0px 0px 0px 10px red;
transform: rotate(-25deg);
text-align:center;
}
.stamp:after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: url("http://i.imgur.com/5O74VI6.jpg");
mix-blend-mode: lighten;
}
<p class="stamp"><span>COD</span><br>5c84b19c98b21f292c9d086f
</p>
【问题讨论】:
-
对于初学者来说,Internet Explorer 根本不支持 mix-blend-mode 属性。
-
这两个属性在 IE 中引起问题。我们可以在 IE 中删除它们并在 chrome 中应用它们吗?想要使用 CSS 而不是任何 javascript 来做到这一点。尝试使用@media screen 和 (-ms-high-contrast: active), (-ms-high-contrast: none) 但没有运气。背景图像:url(“i.imgur.com/5O74VI6.jpg");混合混合模式:变亮;
-
你可以尝试this为IE添加一些CSS后备规则。再说一次,IE 不支持 mix-blend-mode。
标签: css internet-explorer