【HTML——简易 飞机大战 小游戏(效果+代码)】

}

/* 爆炸图片 */

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;

}

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值