html五子棋源代码
导读:HTML五子棋源代码 五子棋 .chessboard {width: 585px;height: 585px;border: 2px solid #333;position: relative;margin:...
HTML五子棋源代码
五子棋 .chessboard {
width: 585px;
height: 585px;
border: 2px solid #333;
position: relative;
margin: 10px auto;
}
.row {
width: 585px;
height: 39px;
border-top: 1px solid #333;
position: absolute;
left: 0;
}
.col {
width: 39px;
height: 585px;
border-left: 1px solid #333;
position: absolute;
top: 0;
}
.chessman {
width: 30px;
height: 30px;
border-radius: 50%;
border: 1px solid #333;
background-color: #fff;
position: absolute;
top:0;
left:0;
}
#win {
position: absolute;
top: 0;
left: 0;
width: 585px;
height: 585px;
background-color: rgba(255,255,255,0.7);
display: none;
}
#win h3 {
font-size: 24px;
text-align: center;
line-height: 80px;
}
var chessArr=[],nowMan=true;
//nowMan为false表示黑棋,true表示白棋 //初始化棋盘 function init(){
var board=document.getElementById("board");
for(var i=0;
i
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: html五子棋源代码
本文地址: https://pptw.com/jishu/535335.html
