分享一个以前写的小游戏,纯js游戏,代码很简单。欢迎大家来喷呦!
效果图:
代码展示://直接复制到html文件即可 支持IE9+版本
Best Fly Carinput {
border: 1px solid yellow;
margin-left: 20px;
margin-top: 20px;
}
.way-content {
margin-left: auto;
margin-right: auto;
width: 1024px;
height: 700px;
position: relative;
border: 1px solid burlywood;
background-color: darkolivegreen;
}
.car {
color:black;
width: 20px;
height: 20px;
border: 1px solid brown;
background: greenyellow;
position: absolute;
left: 502px;
top: 678px;
text-align: center;
z-index: 99;
}
.C-car {
color:black;
width: 20px;
height: 15px;
border: 1px solid brown;
background: red;
position: absolute;
left: 502px;
top: 0px;
text-align: center;
z-index: 98;
}
.way-grid {
margin: 0 0;
margin-left: 412px;
background-color: grey;
border: none;
border-right: 1px solid brown;
border-left: 1px solid brown;
min-width: 100px;
max-width: 1024px;
width: 200px;
height: 10px;
color: white;
font-size: 5px;
position: relative;
text-align: center;
}
.go {
background: greenyellow;