如果您在mix-blend-mode
属性之前使用动画效果,您将不会获得混合混合模式。
删除动画类或禁用动画后,mix-blend-mode
将起作用。
问题是什么?我花了几个小时来解决这个简单的事情。请帮忙
.box {
background-color:yellow;
overflow:hidden;
border-radius:10px;
}
.box img{ mix-blend-mode:multiply}
.animate{
border:1px solid red;
width:30px; height:30px;
animation: spin 2s infinite linear;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(1turn); }
}
<div class="animate">123</div>
<div class="box">
<img src="https://placeimg.com/400/200/animals" alt="">
</div>
mix blend 无论如何都应该生效