【HTML——简易 飞机大战 小游戏(效果+代码,微信web开发教程

先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7

深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年最新Web前端全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
img
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上前端开发知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

如果你需要这些资料,可以添加V获取:vip1024c (备注前端)
img

正文

position: relative;

width: 540px;

height: 960px;

margin: 20px auto;

border: 1px solid transparent;

background: url(‘img/bg.jpg’) center/cover;

}

#wrap h1 {

color: azure;

text-align: center;

padding: 30px;

}

.option {

width: 200px;

height: 110px;

line-height: 110px;

font-size: 30px;

color: steelblue;

background: wheat;

font-weight: bold;

margin: 20px auto;

text-align: center;

cursor: pointer;

background: url(./img/fire-row.png) no-repeat center -10px/ 90% auto ;

}

.footer {

position: absolute;

right: 0;

bottom: 0;

font-size: 20px;

color: #fff;

}

/* enemy 敌机定位 */

.enemy {

position: absolute;

}

/* 血条 */

.blood {

position: absolute;

left: 0;

right: 0;

top: -6px;

margin: 0 auto;

width: 70%;

height: 2px;

border-radius: 2px;

/* border: 1px solid red; */

}

.blood p {

height: 100%;

/* background: red; */

}

/* 小飞机 */

.small {

width: 50px;

}

img:not(.boom) {

width: 100%;

height: 100%;

}

/* 大飞机 */

.big {

width: 60px;

}

.big .blood {

position: absolute;

left: 0;

right: 0;

top: -10px;

margin: 0 auto;

height: 4px;

border-radius: unset;

}

.blood p {

height: 100%;

/* background: red; */

}

/* 我军 */

.plane {

position: absolute;

}

.plane img{

transform: rotate(270deg);

}

.plane.small {

width: 80px;

}

.plane.big {

width: 100px;

}

.biu {

position: absolute;

}

.biu.strong1 {

width: 26px;

height: 26px;

}

.biu.strong2 {

width: 20px;

height: 20px;

}

/* 爆炸图片 */

img.boom {

position: absolute;

animation: opa 1s;

}

@keyframes opa {

0% {

opacity: 1;

}

25% {

opacity: 0.5;

}

50% {

opacity: 1;

}

100% {

opacity: 0;

}

}

/* prize */

.prize {

position: absolute;

width: 50px;

height: 50px;

font-size: 50px;

text-align: center;

line-height: 50px;

border: 1px dashed red;

color: red;

font-weight: bold;

animation: prize 1s infinite;

}

@keyframes prize {

0% {

transform: scale(1);

}

50% {

transform: scale(1.2);

}

100% {

transform: scale(1);

}

}

/* 得分板 */

.score {

position: absolute;

top: 0;

left: 0;

width: 70px;

height: 30px;

color: #fff;

font-size: 20px;

}

/* 记录得分 */

.record {

width: 60%;

height: 100px;

margin: 100px auto;

background: #000;

padding: 10px;

border: 4px double #fff;

color: #fff;

}

.record p {

height: 50px;

font-size: 40px;

font-weight: bold;

text-align: center;

color: skyblue;

}

/* 再来一次 */

.btn {

position: absolute;

bottom: 50px;

right: 0;

left: 0;

margin: auto;

width: 150px;

height: 40px;

text-align: center;

line-height: 40px;

color: #fff;

font-size: 20px;

font-weight: bold;

border-radius: 10px;

background: #000;

cursor: pointer;

}

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值