如果在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>
混合模式应该仍然生效。