小编Vos*_*bek的帖子

混合模式和动画之间的冲突

如果您在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); }
}
Run Code Online (Sandbox Code Playgroud)
<div class="animate">123</div>


<div class="box">
  <img src="https://placeimg.com/400/200/animals" alt=""> 
</div>
Run Code Online (Sandbox Code Playgroud)

无论如何混合混合应该生效

css css-animations mix-blend-mode

10
推荐指数
1
解决办法
993
查看次数

标签 统计

css ×1

css-animations ×1

mix-blend-mode ×1