<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.box {
overflow: hidden;
width: 500px;
height: calc(100vh - 100px);
margin: 100px auto;
background-color: black;
position: relative;
}
.plane {
width: 100px;
height: 100px;
background: url(./qq.png) 0 / 100% 100%;
position: absolute;
left: calc(50% - 50px);
bottom: 5px;
}
.bullet {
position: absolute;
/* left: calc(50% - 50px); */
width: 300px;
height: 30px;
border-radius: 10px;
background-color: chocolate;
}
.enemy {
width: 60px;
height: 60px;
background: url(./qq.png) 0 / 100% 100%;
position: absolute;
left: calc(50% - 60px);
bottom: 5px;
}
</style>
</head>
<body>
<div class="box">
<div class=
教你用JS制作飞机大战
最新推荐文章于 2024-03-09 10:25:08 发布