<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h1 id="a"></h1>
<script>
var matha = 50;
var txt = "本人学识渊博、经验丰富,代码风骚、效率恐怖,C/C++、java、php无不精通,熟练掌握各种框架,深山苦练20余年,一天只睡4个小时,千里之外定位问题,瞬息之间修复上线。身体强壮、健步如飞,可连续编程100小时不休息,讨论技术方案5小时不喝水,上至带项目、出方案,下至盗账号、威胁PM,啥都能干。泡面矿泉水已准备好,学校不支持编程已辍学,家人不支持编程已断绝关系,老婆不支持编程已离婚,小孩不支持编程已送孤儿院,备用电源万兆光纤永不断电断网,门口已埋雷无人打扰。";
var a = document.getElementById("a");
function tim(){
var s = txt.split("");
var length = s.length;
var i = 0;
setInterval(function(){
if(i<length)
{ var tem = s[i++];
a.innerHTML+=tem;
a.style.color=getColor();
//document.body.style.backgroundColor=getColor();
}
},matha)
}
function getColor(){
var RED=parseInt(Math.random()*255)+1;
var GREEN=parseInt(Math.random()*255)+1;
var BLUE=parseInt(Math.random()*255)+1;
return "rgb("+RED+","+GREEN+","+BLUE+")";
}
tim();
</script>
</body>
</html>
打字机效果
最新推荐文章于 2023-05-14 13:02:01 发布