使用CSS在左动画效果中反弹
要使用CSS实现左动画效果中的弹跳,您可以尝试运行以下代码-
示例
<html>
<head>
<style>
.animated {
background-image: url(/css/images/logo.png);
background-repeat: no-repeat;
background-position: left top;
padding-top:95px;
margin-bottom:60px;
-webkit-animation-duration: 10s;
animation-duration: 10s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes bounceInLeft {
0% {
opacity: 0;
-webkit-transform: translateX(-2000px);
}
60% {
opacity: 1;
-webkit-transform: translateX(30px);
}
80% {
-webkit-transform: translateX(-10px);
}
100% {
-webkit-transform: translateX(0);
}
}
@keyframes bounceInLeft {
0% {
opacity: 0;
transform: translateX(-2000px);
}
60% {
opacity: 1;
transform: translateX(30px);
}
80% {
transform: translateX(-10px);
}
100% {
transform: translateX(0);
}
}
.bounceInLeft {
-webkit-animation-name: bounceInLeft;
animation-name: bounceInLeft;
}
</style>
</head>
<body>
<div id="animated-example" class="animated bounceInLeft"></div>
<button onclick="myFunction()">Reload page</button>
<script>
function myFunction() {
location.reload();
}
</script>
</body>
</html>热门推荐
10 祝福语签名简短大全女生
11 离职横幅升职祝福语简短
12 新年过后奋斗祝福语简短
13 婆婆生娃祝福语简短
14 朋友家住豪宅祝福语简短
15 虎年文案简短祝福语长辈
16 送爸爸的简短祝福语
17 同事辞职正常祝福语简短
18 姑娘生日祝福语简短的话