网页中使文字闪烁的标签是什么,其实没有html标签可以直接让文字闪烁的,需要使用js脚本来实现。
代码如下:
<script language= "javascript " type= "text/javascript "> function showit() { self.setInterval( "changeit() ", 800); } function changeit() { var bg = '# '; var color = new Array( "A ", "B ", "C ", "D ", "E ", "F "); var node = document.getElementById( "con ");//#33FF33 for (var j=1; j <7; j++) { var i = Math.round(Math.random()*10); if (i> =5) { bg = bg+color[i-5]; } else { bg = bg + i; } } node.style.color = bg; } </script> </HEAD> <BODY onload= "showit(); "> <div id= "con " style= "background:#330000;color:#FF3300;width:80px;height:30px;font-size:16pt; "> lasdflasdfhalsdfaldfladhladhlasd </div> </BODY> </HTML>
以上是利用html实现文字闪烁的效果代码的详细内容。更多信息请关注PHP中文网其他相关文章!