
动画相关属性有:transform、transform-origin、transition、“@keyframes”、animation、animation-name、animation-duration、animation-delay等。
本教程 *** 作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。
css3有三种动画分为:transform、transition、animation
1、transform(2D/3D 转换属性)
2、transition(过渡属性)
3、animation(动画属性)
示例:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 50px;
height: 50px;
background: red;
margin: 100px;
animation: mymove 5s infinite;
-webkit-animation: mymove 5s infinite; /* Safari and Chrome */
}
@keyframes mymove {
50% {
width: 150px;
height: 150px;
transform: rotate(360deg);
}
}
@-webkit-keyframes mymove{ /* Safari and Chrome */
50% {
width: 100px;
height: 100px;
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div></div>
</body>
</html>(学习视频分享:css视频教程)
以上就是CSS3设置动画的相关属性有哪些的详细内容,
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)