js实现五子棋小游戏
代码语言:html
所属分类:游戏
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>五子棋</title>
<link rel="stylesheet" href="">
<style type="text/css" media="screen">
* {
margin: 0;
padding: 0;
}
img {
border: 0;
}
input {
outline: none;
}
html,body {
width: 100%;
height: 100%;
overflow: hidden;
}
ol, ul ,li {
list-style: none;
}
.wrap {
max-width: 750px;
max-height: 750px;
margin: 0px auto;
background: #fc9e46;
position: relative;
}
#layout {
width: 100%;
height: 100%;
position: relative;
background: url('http://repo.bfw.wiki/bfwrepo/image/wzqbj2.png') center center no-repeat / cover;
}
span.W {
background: #fff;
}
span.B {
background: #000;
}
span {
display: block;
border-radius: 50%;
background: #000;
position: absolute;
}
#start,#win {
width: 100%;
height: 32px;
padding-bottom: 1000px;
position: absolute;
text-align: center;
top: 0;
left: 0;
}
#win {
display: none;
}
#start input,#win input {
margin: 0 5px;
padding: 5px 20px;
border: none;
border-radius: 5px;
font-size: 32px;
color: #fff;
background: #333;
box-shadow: 1px 1px 1px #111,inset 0px 0px 2px #333;
cursor: pointer;
}
#start input:active,#win input:active {
background: #222;
}
#showwin {
width: 100%;
height: 100px;
line-height: 100px;
background: #333;
text-align: center;
position: absolute;
color: red;
font-size: 30px;
font-weight: bold;
opacity: 0.9.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0