css+js实现一个扫雷游戏代码

代码语言:html

所属分类:游戏

代码描述:css+js实现一个扫雷游戏代码

代码标签: css js 扫雷 游戏 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  


  
<style>
@font-face {
  font-family: "digital-7";
  src: url("//repo.bfw.wiki/bfwrepo/fonts/digital-7.ttf");
  font-style: normal;
  font-weight: normal;
}
body {
  background-color: #eae0d5;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: helvetica;
  color: #0a0908;
  perspective: 1000px;
}

.container {
  background-color: #5e503f;
  padding: 15px;
  box-shadow: 0px 0px 20px 5px rgba(0, 0, 0, 0.3);
}

.info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.info-bar label {
  background-color: #22333b;
  color: #eae0d5;
  font-family: "digital-7", "Courier New", serif;
  font-size: 30px;
  padding: 5px;
  display: block;
  min-width: 80px;
  text-align: center;
  box-shadow: inset 1px 1px 10px rgba(0, 0, 0, 0.3);
}
.info-bar button {
  width: 60px;
  height: 40px;
  border: none;
  background-color: #c6ac8f;
  color: #0a0908;
  font-size: 25px;
  text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3);
}

#panel {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.cell {
  width: 30px;
  height: 30px;
  background-color: #eae0d5;
  text-indent: -9999px;
  cursor: pointer;
  font-size: 12px;
}
.cell.flagged {
  text-indent: 0;
  cursor: default;
}
.cell.pressed {
  text-indent: 0;
  background-color: #d9c.........完整代码请登录后点击上方下载按钮下载查看

网友评论0