css闪动效果 ----样式发生快速的变化
2020-11-18 19:06
标签:style blog class code java javascript ext color get html set css闪动效果 ----样式发生快速的变化,搜素材,soscw.com css闪动效果 ----样式发生快速的变化 标签:style blog class code java javascript ext color get html set 原文地址:http://www.cnblogs.com/supber/p/3701416.htmlDOCTYPE >
html>
head>
title>JS+CSS做文字闪烁title>
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
style>
.wa{
font-size:13px;
color: #0000FF;
}
.wa2{
font-size:13px;
color: #FFFF00;
}
.sty1{
display: block;
}
.sty2{
display: none;
}
style>
head>
body>
span class="wa" id="shan">北京青年span>
div class="sty1" id="pic">
img src="../img/girl.jpg" />
div>
script type="text/javascript">
function change(){
var ss = document.getElementById("shan");
if(ss.className == "wa"){
ss.className = "wa2";
}else{
ss.className = "wa";
}
setTimeout("change()",100);
}
change();
picChange();
function picChange(){
var pic = document.getElementById("pic");
if(pic.className == "sty1"){
pic.className = "sty2";
}else {
pic.className = "sty1";
}
setTimeout("picChange()",50);
}
script>
body>
html>
下一篇:js跨域post请求