2-16编程怎么每一次延迟.5s?
来源:2-29 编程练习
慕粉223217810
2017-04-02 17:09:21
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>2-9</title>
<style type="text/css">
div {
font-family: Arial;
font-size: 72px;
font-weight: bold;
position: fixed;
right: 0;
left: 0;
bottom:50px;
width: 30px;
height: 30px;
margin: auto;
transform: rotate(90deg);
/*此处写代码*/
animation:on 1s 0.5s infinite alternate;
}
@keyframes on {
from { transform: rotate(90deg); bottom:50px;}
to { transform: rotate(90deg); bottom:-1px;}
}
</style>
</head>
<body>
<div>></div>
</body>
</html>
1 | |
1回答
樱桃小胖子
2017-04-02
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.item1{
list-style: none;
-webkit-animation: revolving 4s 0s infinite;
animation: revolving 4s 0s infinite;
}
@-webkit-keyframes revolving{
0,75%{
-webkit-transform: perspective(700px) rotateX(90deg);
}
87.5%{
-webkit-transform: perspective(700px) rotateX(0deg);
}
100%{
-webkit-transform: perspective(700px) rotateX(-90deg);
}
}
</style>
</head>
<body>
<ul>
<li>慕课网</li>
</ul>
</body>
</html>把总动画设为4秒,然后前75%也就是3秒都没变化(0-75%),之后的25%也就是1秒做动画就可以了。
相似问题