html - 白色背景的动画不起作用
问题描述
我正在为按钮设置一个简单的动画。
@keyframes test {
from {
background-color: blue;
}
to {
background-color: green;
}
}
button {
animation-name: test;
animation-duration: 1s;
animation-iteration-count: infinite;
}
<button style="width: 200px; height: 200px; background-color: white;">button</button>
当按钮的背景颜色为白色时,动画是不可见的。当按钮具有红色背景色时,动画可见。为什么?
解决方案
推荐阅读
- java - 即使在 java 中设置了关系,Hibernate 也没有在 mysql 中设置外键
- asp.net-core-webapi - 删除 ProducesResponseType 属性 webapi aspnetcore 2.1
- firebase - 如何在 ionic v1 中跟踪 Firebase 分析中的事件
- javascript - 如何执行过滤器和包含
- ios - 如何在iOS swift中使用firestore获取用户的帖子计数
- development-environment - 页面未在谷歌搜索控制台中索引
- swift - 即使在使用“准备”之后,ARKit 添加节点也会导致丢帧
- python - 如果值中的搜索项(值是列表),则获取 dict 的键
- solr - Solr Suggestor 的 DSE CQL 查询
- c - 在客户端和服务器上使用 UDP 套接字的封装和辅助功能