逃跑按钮不断离开浏览器窗口

时间:2016-12-15 10:37:59

标签: javascript jquery html5

我有问题。我正在尝试编程逃跑按钮,但它一直离开浏览器窗口。有没有办法如何设置随机运动的一些限制?我试图将此按钮添加到Adobe MUSE网站...任何想法请?谢谢!

<input onclick="location.href='http://www.besyx.sk/PF2017/gratulujeme.html';"
value="CHCEM ZVÝŠIŤ ADRENALÍN" 
style="transition: all 0.3s ease 0s; 
background: rgb(48, 197, 255) none repeat scroll 0% 0%; 
color: rgb(255, 255, 255); 
height: 50px; 
border: 1px solid rgb(0, 153, 179); 
border-radius: 100px; 
padding-left: 20px; 
padding-right: 20px; 
margin-left: 0px; 
margin-top: 0px; 
margin-bottom: 0px;" 
onmouseover="this.style.marginLeft=Math.random()*400+event.clientX/8+'px'; this.style.marginTop=Math.random()*400+event.clientY/8+'px';" type="button">

0 个答案:

没有答案