⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 9.3.htm

📁 使用javascript处理文字处理特效源码
💻 HTM
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>文字显示效果</title>
</head>
<body bgcolor="black">
<h1><font color="white">文字的闪烁显示</font></h1><hr>
<script language="JavaScript">
<!--
document.write('<style><!--');
document.write('#glowtext{filter:glow(color=#F5D20A,strength=2);width:100%;}');          //对glowtext加滤镜效果
document.write('--></style>');
document.write('<span id="glowtext"><font color="#0A9DF5" face="隶书" size="8">大江东去,浪淘尽,千古风流人物。</font></span>');

function glowit(which){
if (document.all.glowtext[which].filters[0].strength==2)          //如果当前是效果2
document.all.glowtext[which].filters[0].strength=1          //则变成1
else
document.all.glowtext[which].filters[0].strength=2}          //否则变成2

function glowit2(which){
if (document.all.glowtext.filters[0].strength==2)          //如果当前是效果2
document.all.glowtext.filters[0].strength=1          //则变成1
else
document.all.glowtext.filters[0].strength=2}          //否则变成2

function startglowing(){
if (document.all.glowtext&&glowtext.length){          //如果当前窗口中存在多个使用心跳效果的字符串
for (i=0;i<glowtext.length;i++)
eval('setInterval("glowit('+i+')",300)')          //设置心跳的速度
}
else if (glowtext)          //如果只有一个使用效果的字符串
setInterval("glowit2(0)",300)          //设置闪烁的速度
}


window.onload=startglowing          //直接调用startglowing函数

//-->
</script>
</body>
</html>

⌨️ 快捷键说明

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