36.html

来自「javescript网页特效80个例子」· HTML 代码 · 共 57 行

HTML
57
字号
<html>
<head>
<title>文字外围扩散</title>
</head>
<body>
<span id="theText" style="width:100%"> 
<h1 align="center">
<font color="red">HELLO!真高兴你能来我的主页</font></h1></span>
<script> 
<!-- 
var from = 5;   //设置扩散范围其始尺寸
var to = 20;   //设置扩散范围结束尺寸
var delay = 1;  //设置扩散速度
var glowColor = "orange";  //设置外围颜色
var i = to; 
var j = 0; 
textPulseDown(); 
 
function textPulseUp() 
{ 
if (!document.all) 
return 
if (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) 
return 
if (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> 
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?