CSS的Flash动画效果
元素突然突然突然发出闪光会产生闪光效果。
示例
<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: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@keyframes flash {
0%, 50%, 100% {
opacity: 1;
}
25%, 75% {
opacity: 0;
}
}
.flash {
animation-name: flash;
}
</style>
</head>
<body>
<div id = "animated-example" class = "animated flash"></div>
<button onclick = "myFunction()">Reload page</button>
<script>
function myFunction() {
location.reload();
}
</script>
</body>
</html>热门推荐
10 关于扬州的祝福语简短
11 兔年祝福语简短100字
12 祝福语同事离职英文简短
13 给儿子生日祝福语 简短
14 姨父生日祝福语简短精辟
15 叶海燕老师祝福语简短
16 对美好前程祝福语简短
17 新人结婚父母祝福语简短
18 生日祝福语短句简短霸气