用html写游戏,用HTML写的整人小游戏(一)之 奔跑的no
这个小游戏是无意间看到的,觉得很有意思,所以拿出来和大家一起分享lei
基本界面就是下面的,以后希望能做更多的出来分享!谢谢你们、
#a{
width: 500px;
height: 200px;
position: absolute;
left: 500px;
top: 200px;
padding-top: 100px;
background-color: pink;
border: 1px black solid ;
text-align: center;
}
#no{
position: absolute;
left: 100px;
top: 100px;
}
function a(){
var no = document.getElementById("no");
no.style.left = Math.floor(Math.random()*450)+"px";
no.style.top = Math.floor(Math.random()*280)+"px";
}
function b(){
alert("得到你了!哈哈")
}
DO you wang to marry with me?
yes
no

本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
