- 热门类别
Data Structure(数据结构)
Networking(网络)
RDBMS(关系型数据库管理系统)
Operating System(操作系统)
Java
MS Excel(微软 Excel)
iOS
HTML(超文本标记语言)
CSS(层叠样式表)
Android(安卓)
Python(Python)
C Programming(C 编程)
C++(C++)
C#(C#)
MongoDB(MongoDB)
MySQL(MySQL)
Javascript(Javascript)
PHP(PHP)Physics(物理学)
Chemistry(化学)
Biology(生物学)
Mathematics(数学)
English(英语)
Economics(经济学)
Psychology(心理学)
Social Studies(社会研究)
Fashion Studies(时尚研究)
Legal Studies(法律学)
哪种 CSS 属性用于反向运行动画?
使用 animation-direction 属性以反向运行动画。此属性与 reverse 动画值一起使用以达到此目的。
示例
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
height: 200px;
background-color: yellow;
animation-name: myanim;
animation-duration: 2s;
animation-direction: reverse;
}
@keyframes myanim {
from {
background-color: green;
}
to {
background-color: blue;
}
}
</style>
</head>
<body>
<div></div>
</body>
</html>
广告