<div id="abc">这里是闪光的字</div>
<script>
var i=0
function shine(id){
var obj= document.getElementById(id)
if(i==0){obj.style.color="#000"i=1}else{obj.style.color="red"i=0}
}
setInterval("shine('abc')",100)
</script>
1, css3圆形光环闪烁效果。2,文件引用:,
<style type="text/css">
body{background: #EF7148}
img{cursor:pointer-webkit-animation: scaleout 1.3s infinite ease-in-outanimation: scaleout 1.3s infinite ease-in-out}
@-webkit-keyframes scaleout {
0% { -webkit-transform: scale(1.0) }
100% {
-webkit-transform: scale(1.1)
opacity: 0
}
}
@keyframes scaleout {
0% {
transform: scale(1.0)
-webkit-transform: scale(1.0)
} 100% {
transform: scale(1.1)
-webkit-transform: scale(1.1)
opacity: 0
}
}
</style>