Javascript的荧光字效果

    技术2022-05-11  218

    <span id="theText" style="width:100%"><h1>荧 光 效 果 例 子</h1></span>

    <script><!--var from = 1;var to = 4;var delay = 55; //闪的速度var glowColor = "lime";//颜色var i = to;var j = 0;textPulseDown();

    function textPulseUp(){if (!document.all)returnif (i < to){theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";i++;theTimeout = setTimeout('textPulseUp()',delay);return 0;}

    if (i = to){theTimeout = setTimeout('textPulseDown()',delay);return 0;}

    }

    function textPulseDown(){if (!document.all)returnif (i > from){theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")";i--;theTimeout = setTimeout('textPulseDown()',delay);return 0;}

    if (i = from){theTimeout = setTimeout('textPulseUp()',delay);return 0;}}

    //--></script>


    最新回复(0)