这个小游戏是无意间看到的,觉得很有意思,所以拿出来和大家一起分享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