網頁中讓文字閃爍的標籤是什麼,其實沒有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中文網其他相關文章!