hta實(shí)現(xiàn)涂鴉效果代碼
發(fā)布日期:2021-12-23 00:22 | 文章來(lái)源:腳本之家
復(fù)制代碼 代碼如下:
<html>
<head>
<hta:APPLICATION
CAPTION="no"
SCROLL="no"
SHOWINTASKBAR="no"
INNERBORDER="no"
CONTEXTMENU="no"
BORDER="none"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
>
<title></title>
<script>
vartimer=100;
varrandDiv=newArray(100);
window.onload=function()
{
for(vari=0;i<randDiv.length;i++)
{
randDiv[i]=document.createElement("DIV");
randDiv[i].style.cssText="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);";
randDiv[i].style.position="absolute";
randDiv[i].style.background=GetRandomColor();
document.body.appendChild(randDiv[i]);
}
Fun();
}
functionFun()
{
for(vari=0;i<randDiv.length;i++)
{
randDiv[i].style.top=Math.floor(Math.random()*window.screen.height);
randDiv[i].style.left=Math.floor(Math.random()*window.screen.width);
randDiv[i].style.width=Math.floor(Math.random()*100);
randDiv[i].style.height=Math.floor(Math.random()*100);
randDiv[i].style.background=GetRandomColor();
}
setTimeout("Fun()",timer);
}
functionGetRandomColor()
{
varr=Math.floor(Math.random()*255).toString(16);
varg=Math.floor(Math.random()*255).toString(16);
varb=Math.floor(Math.random()*255).toString(16);
r=r.length==1?"0"+r:r;
g=g.length==1?"0"+g:g;
b=b.length==1?"0"+b:b;
return"#"+r+g+b;
}
</script>
</head>
<body>
</body>
</html>
木容涂鴉板(MoronScratch)可以在線生成一個(gè)在桌面上自動(dòng)繪畫的應(yīng)用程序。
只需要你發(fā)揮想象繪制一副想要的圖案,然后點(diǎn)擊下載按鍵就可以得到一個(gè)很小的moron_scratch.exe的程序。
雙擊運(yùn)行它,就能看到你的鼠標(biāo)在桌面上自動(dòng)畫了起來(lái):)
地址
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。
相關(guān)文章
關(guān)注官方微信