五子棋(jquery)
花了一天时间完成一个j简单五子棋游戏(非人机)
html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="./index.css">
<script src="./jquery-3.4.1.min.js"></script>
<title>Document</title>
</head>
<body>
<div id="five">
<header>
<button id="begin">开始游戏</button>
<button id="agin">重新游戏</button>
<button id="regret">悔棋</button>
</header>
<div id="game">
</div>
</div>
<script src="./index.js"></script>
</body>
</html>
css:
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
html,
body,
#five{
background:#ccc;
height: 100%;
}
header{
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
margin: auto;
}
#game{
display:none;
position: absolute;
box-shadow:2px 2px 5px #333333;
padding: 17px;
top: 60px;
border: 1px solid #ccc;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.2);
box-sizing: border-box;
}
button{
padding: 5px;
cursor: pointer;
}
.qipan{
box-shadow:-2px 1px 5px #333333;
position: relative;
}
table{
border-collapse: collapse;
border-spacing: 0;
}
td{
width: 35px;
height