runxinzhi.com
首页
百度搜索
魔兽技能CD效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>WarICON Prefect</title> <style> .icoBox { position: absolute; overflow: hidden; 64px; height: 64px; background: #000; } .icoBox * { margin: 0; position: absolute; } .icoBox .mask { display: none; overflow: hidden; border: 33px solid #000001; filter: Chroma(color='black') alpha(opacity=60); -moz-opacity: 0.6; -khtml-opacity: 0.6; opacity: 0.6; } .icoBox .layer0 { height: 0px; left: 33px; top: -33px; border-top: 33px solid transparent; border-left: 0px solid transparent; } .icoBox .layer1 { 0px; left: 33px; top: 33px; border-top: 0px solid transparent; border-right: 33px solid transparent; } .icoBox .layer2 { left:-33px; top: 33px; border-bottom: 33px solid transparent; border-right: 0px solid transparent; } .icoBox .layer3 { left: -33px; top: -33px; border-bottom: 0px solid transparent; border-left: 33px solid transparent; } .icoBox { position: absolute; overflow: hidden; 64px; height: 64px; background: #000; } .icoBox * { margin: 0; position: absolute; } .icoBox .mask { display: none; overflow: hidden; border: 33px solid #000001; filter: Chroma(color='black') alpha(opacity=60); -moz-opacity: 0.6; -khtml-opacity: 0.6; opacity: 0.6; } .icoBox .layer0 { height: 0px; left: 33px; top: -33px; border-top: 33px solid transparent; border-left: 0px solid transparent; } .icoBox .layer1 { 0px; left: 33px; top: 33px; border-top: 0px solid transparent; border-right: 33px solid transparent; } .icoBox .layer2 { left:-33px; top: 33px; border-bottom: 33px solid transparent; border-right: 0px solid transparent; } .icoBox .layer3 { left: -33px; top: -33px; border-bottom: 0px solid transparent; border-left: 33px solid transparent; } </style> </head> <body ondragstart="return false"> <div id="divBox" class="icoBox" style="left:10px; top:10px;" _mce_style="left: 10px; top: 10px;"> <img id="divBGPic" class="icoBGPic" src="http://pic002.cnblogs.com/images/2011/156724/2011021814244356.png" _mce_src="http://pic002.cnblogs.com/images/2011/156724/2011021814244356.png" onmousedown="handleMouseDown()" /> </div> <script type="text/javascript"> var $ = function(v){return document.getElementById(v)} var $c = function(v){return document.createElement(v)} var __VER__ = navigator.userAgent; var __FF__ = /Firefox/.test(__VER__); if(__FF__) { CSSStyleDeclaration.prototype.__defineSetter__("pixelHeight", function(v){this.height = v+"px";}); CSSStyleDeclaration.prototype.__defineSetter__("pixelWidth", function(v){this.width = v+"px";}); CSSStyleDeclaration.prototype.__defineSetter__("pixelTop", function(v){this.top = v+"px";}); CSSStyleDeclaration.prototype.__defineSetter__("pixelLeft", function(v){this.left = v+"px";}); } try{document.execCommand("BackgroundImageCache", false, true)}catch(e){} </script> <script type="text/javascript"> var styPic = $("divBGPic").style; var arrMask = []; var tickID; var stage; var inCD; window.onload =function() { var i,obj; for(i=0; i<4; i++) { obj = $c("div"); obj.className = "mask layer" + i; arrMask[i] = obj.style; $("divBox").appendChild(obj); } }; function handleMouseDown() { styPic.pixelLeft = 2; styPic.pixelTop = 2; styPic.pixelWidth = 60; styPic.pixelHeight = 60; } document.onmouseup =function(e) { styPic.pixelLeft = 0; styPic.pixelTop = 0; styPic.pixelWidth = 64; styPic.pixelHeight = 64; e = e || event; e = e.srcElement || e.target; if(e != $("divBGPic")) return; if(inCD) return; inCD = true; tickID = 0; stage = 0; Reset(); }; function Draw() { if(!inCD) return; var i = ++tickID; switch(stage) { case 0: arrMask[0].borderLeftWidth = i + "px"; break; case 1: arrMask[0].pixelHeight = i; arrMask[0].borderBottomWidth = (33-i) + "px"; break; case 2: arrMask[1].borderTopWidth = i + "px"; break; case 3: arrMask[1].pixelWidth = i; arrMask[1].borderLeftWidth = (33-i) + "px"; break; case 4: arrMask[2].pixelWidth = 33 - i; arrMask[2].borderRightWidth = i + "px"; break; case 5: arrMask[2].pixelHeight = i; arrMask[2].borderTopWidth = (33-i) + "px"; break; case 6: arrMask[3].pixelHeight = 33 - i; arrMask[3].borderBottomWidth = i + "px"; break; case 7: arrMask[3].pixelWidth = i; arrMask[3].borderRightWidth = (33-i) + "px"; break; case 8: inCD = false; for(i=0; i<4; i++) arrMask[i].display = "none"; break; } if(tickID == 33) { tickID = 0; stage++; } } function Reset() { for(var i=0; i<4; i++) { arrMask[i].display = "block"; } arrMask[0].pixelWidth = 0; arrMask[0].pixelHeight = 0; arrMask[0].borderLeftWidth = "0"; arrMask[0].borderBottomWidth = "33px"; arrMask[1].pixelWidth = 0; arrMask[1].pixelHeight = 0; arrMask[1].borderTopWidth = "0"; arrMask[1].borderLeftWidth = "33px"; arrMask[2].pixelWidth = 33; arrMask[2].pixelHeight = 0; arrMask[2].borderRightWidth = "0"; arrMask[2].borderTopWidth = "33px"; arrMask[3].pixelWidth = 0; arrMask[3].pixelHeight = 33; arrMask[3].borderBottomWidth = "0"; arrMask[3].borderRightWidth = "33px"; } function RenderRoutine() { Draw(); } setInterval(RenderRoutine, 16); </script> </body> </html>
运行代码
相关阅读:
[SoapUI] 在执行某个TestSuite之前先执行login或者其他什么前置步骤
[Groovy] How to check if element in groovy array/hash/collection/list?
[Groovy] List和Map用法搜集
[Groovy] 实战 Groovy, for each 剖析
Groovy基本语法
[BAT] xcopy拷贝远程服务器共享文件到本地
[BAT] Access Denied in XCopy
[BAT] 执行xcopy命令后出现Invalid num of parameters错误的解决办法
[Automation] 自动化测试度量标准
jsp页面直接编写csss
原文地址:https://www.cnblogs.com/geass/p/1957809.html
最新文章
UNIX网络编程——Socket/TCP粘包、多包和少包, 断包
UNIX网络编程——利用ARP和ICMP协议解释ping命令
UNIX网络编程——利用recv和readn函数实现readline函数
UNIX网络编程——tcp流协议产生的粘包问题和解决方案
嵌入式LINUX环境下视频采集知识
Web安全测试之XSS
Fiddler (五) Mac下使用Fiddler
Fiddler (四) 实现手机的抓包
Fiddler (三) Composer创建和发送HTTP Request
利用nginx_push_stream_module实现服务器消息推送
热门文章
关于Spring Cloud前端跨域的问题
关于分布式系统开关功能设计
关于分布式锁Java常用技术方案
关于Java高并发的问题
关于分布式事务处理
关于Redis持久化RDB和AOF
关于Redis的那些事
关于Git在Eclipse中的使用
关于Git提交忽略不必要的文件或文件夹
关于Windows下生成github的ssh公钥
Copyright © 2020-2023
润新知