简介:游戏运用了javaScript,css,html等知识编写的,当点击左右三角形时,气球的移动速度和产生速度都会发生变化,数字越大,速度越快,同时气球上面的金额越大,气球的移动速度就越快,通过计时器控制游戏的时长,点击气球会消失。
游戏效果图片:
具体代码如下:
<head>
<meta charset="UTF-8">
<title></title>
<script src="js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
body {
background: url(img/bg.jpg) no-repeat;
background-size: cover;
}
p {
text-align: center;
color: green;
font-size: 24px;
}
span {
color: red;
}
#dv {
margin: auto;
width: 1200px;
height: 600px;
}
#max {
width: 250px;
height: 600px;
position: fixed;
right: 10px;
top: 20px;
}
#num {
position: absolute;
margin-top: -150px;
left: 65px;
}
.yx {
width: 100px;
height: 130px;
line-height: 80px;
text-align: center;
color: #f00;
bottom: 0px;
position: absolute;
font-wight: bolder;
font-size: 40px;
}
#yy {
font-size: 35px;
font-weight: bold;
color: green;
position: absolute;
bottom: 405px;
left: 45px;
}
</style>
</head>
<body style="cursor:help;">
<div id="dv">
<div>