bootstrap+jquery实现井字棋游戏代码

代码语言:html

所属分类:游戏

代码描述:bootstrap+jquery实现井字棋游戏代码,可设置xo及电脑与玩家。

代码标签: bootstrap jquery 井字棋 游戏 代码

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

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

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

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.3.3.4.css">
<style>
* {
	margin: 0px;
	padding: 0px;
}

.gameboard {
	width: 480px;
	height: 450px;
	margin-left: auto;
	margin-right: auto;
	margin-top: 200px;
	background-color: #000;
}

.gameboard ul {
	list-style: none;
	height: 480px;
	padding: 15px;
}

.grid {
	width: 32.4%;
	height: 30.5%;
	float: left;
	border: 1px solid #E1F5A9;
}

.gameboard li {
	cursor: pointer;
	color: #F9F9F9;
	text-align: center;
	line-height: 138px;
	font-size: 2em;
}

.grid-0, .grid-3, .grid-6 {
	border-left: none;
}

.grid-0, .grid-1, .grid-2 {
	border-top: none;	
}

.grid-2, .grid-5, .grid-8 {
	border-right: none;
}

.grid-6, .grid-7, .grid-8 {
	border-bottom: none;
}

.bg {
	/*display: none;*/
	position: absolute;
	top: 0%;
	left: 0%;
	width: 100%;
	height: 120%;
	background-color: black;
	z-index:1001;
	-moz-opacity: 0.7;
	opacity:.70;
	filter: alpha(opacity=70);
}

.choose-panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	width: 560px;
	height: 200px;
	margin: auto;
	background-color: #FFF;
	margin-top: 200px;
	z-index: 1002;
	border-radius: 25px;
}

.choose-panel p {
	font-size: 2em;
	text-align: center;
	padding-top: 30px;
}

.choose-btn {
	text-align: center;
}

.btn {
	margin: 5px;
	padding:5px;
}

.choose-first {
	display: none;
}
</style>


  
  
</he.........完整代码请登录后点击上方下载按钮下载查看

网友评论0