标签:style blog class code java javascript ext color get html set
<!DOCTYPE > <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>
css闪动效果 ----样式发生快速的变化,码迷,mamicode.com
标签:style blog class code java javascript ext color get html set
原文地址:http://www.cnblogs.com/supber/p/3701416.html