网页字体颜色随机改变效果

5个月前 (05-23 15:13)阅读回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值5294
  • 级别管理员
  • 主题1058
  • 回复2
楼主

网页中字体颜色随机改变效果,运行代码多刷新几次看看,一款字体颜色随机变色特效分享,结合自己的需求来修改。

<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<script language="JavaScript">
 hexa = new MakeArray(16)
 hexa[10] = "A"
 hexa[11] = "B"
 hexa[12] = "C"
 hexa[13] = "D"
 hexa[14] = "E"
 hexa[15] = "F"
//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
 function MakeArray(n)
 {
 this.length = n
 for (var i = 0; i <= n; i++)
 this[i] = i
 return this
 }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
 function colours(text){
 var posa = 0
 var posb = 1
 while (posa <= text.length){
 var r = Math.floor(Math.random() * 15)
 var rr= Math.floor(Math.random() * 15)
 var g = Math.floor(Math.random() * 15)
 var gg = Math.floor(Math.random() * 15)
 var b = Math.floor(Math.random() * 15)
 var bb = Math.floor(Math.random() * 15)
 if (text.substring(posa,posb) == "<"){
 var posaa = 0
 posaa = posa
 while (text.substring(posaa,posb) != ">"){
 posaa++
 posb++
 }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
 document.write(text.substring(posa, posb))
 posa = posb
 posb = posa + 1
 }
 document.write("<font color=#"+hexa[r]+hexa[rr]+hexa[g]+hexa[gg]+hexa[b]+hexa[bb]+">")
 document.write(text.substring(posa, posb)+"</font>")
 posa++
 posb++
 }
 }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
</script>
<script language = "javascript">
 text = "This JavaScript shows every other letter of text as a different, random colour."
 text +="You can also use any <blink> <font size=9> HTML </font> </blink> codes that you want"
 text +=" As long as you don't use quotation marks and the commands have a space between them."
 text +="  You can use any background colour or picture that you want, but black or white is sugeste"
 text +="d <b> <u>HAVE FUN!!! </u> welcome to wuming.ren</b>"
 colours(text)
 </script>


0
0
收藏0

本文来自武鸣人网站,转载请注明出处

本文地址:https://www.wuming.ren/a/1053.html

回帖

网页字体颜色随机改变效果 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息