自制消遣小游戏
  • 板块灌水区
  • 楼主yaoge2012
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/1/10 20:56
  • 上次更新2024/1/10 22:01:20
查看原帖
自制消遣小游戏
1135416
yaoge2012楼主2024/1/10 20:56

我设计了一个小游戏,适合消遣,操作方式如下 键盘左键向左 键盘右键向右 空格发射子弹 tip:射一下蓝色方块即可开始 代码如下:`` `

.plane {
  width: 50px;
  height: 50px;
  background-color: red;
  position: absolute;
  bottom: 0;
}

.enemy-plane {
  width: 50px;
  height: 50px;
  background-color: blue;
  position: absolute;
  top: 0;
}

.bullet {
  width: 5px;
  height: 10px;
  background-color: rgb(33, 178, 219);
  position: absolute;
}

#score {
  font-size: 24px;
  margin-bottom: 10px;
}

#lives {
  font-size: 18px;
}
最后,初来洛谷,请多指教
2024/1/10 20:56
加载中...