angular实现一个国际象棋游戏代码

代码语言:html

所属分类:游戏

代码描述:angular实现一个国际象棋游戏代码

代码标签: 国际象棋 游戏

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

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

<head>

  <meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
  
<style>
html {
    background-image: url('//repo.bfw.wiki/bfwrepo/image/5fbaef09aba3e.png');
	background-size: cover;
}

body {
   width: 580px;
   margin: 10px auto;
}

/*=====BOARD GAME=================*/

#board {
    width: 480px;
    margin: 15px auto 20px auto;
    background: #ccc;
    border: 25px solid #fff;
    border-radius: 10px;
    box-shadow: inset -1px 1px 7px rgba(0,0,0,.2), 
                inset 1px -1px 7px rgba(0,0,0,.2), 
                1px 12px 5px rgba(0,0,0,.4), 
                4px 3px 8px rgba(0,0,0,.4), 
                5px 10px 10px rgba(0,0,0,.2), 
                -5px 10px 10px rgba(0,0,0,.4);
}

#game {
    
}

.row {
    clear: both;
    overflow: hidden;
}

.box {
    width: 60px;
    height: 60px;
    float: left;
    text-align: center;
    line-height: 60px;
    font-size: 50px;
    cursor: default;
}

.placed {
    cursor: pointer;
}

.selected {
    -moz-box-shadow:    inset 0 0 10px #311B0B;
    -webkit-box-shadow: inset 0 0 10px #311B0B;
    box-shadow:         inset 0 0 10px #311B0B;
}

.suggest {
    
    -moz-filter: grayscale(50%);
    -webkit-filter: grayscale(50%);
    filter: grayscale(50%);
    
    -moz-box-shadow:    inset 0 0 15px #0f0;
    -webkit-box-shadow: inset 0 0 15px #0f0;
    box-shadow:         inset 0 0 15px #0f0;
	
    cursor: pointer;
}

/*============================================*/

#result {
    width: 480px;
    height: 480px;
    line-height: 480px;
    position: absolute;
    background: transparent;
    text-align: center;
    font-size: 90px;
    cursor: default;
    animation: blur 1.5s ease-out infinite;
    z-index: 10;
}

.hide {
    display: none;
}

@keyframes blur{
  from {
      text-shadow:0px 0px 10px #fff,
                  0px 0px 10px #fff, 
                  0px 0px 25px #fff,
                  0px 0px 25px #fff,
                  0px 0px 25px #fff,
                  0px 0px 25px #fff,
                  0px 0px 25px #fff,
                  0px 0px 25px #fff,
                  0px 0px 50px #fff,
                  0px 0px 50px #fff,
                  0px 0px 50px #7B96B8,
                  0px 0px 150px #7B96B8,
                  0px 10px 100px #7B96B8,
                  0px 10px 100px #7B96B8,
                  0px 10px 100px #7B96B8,
                  0px 10px 100px #7B96B8,
                  0px -10px 100px #7B96B8,
                  0px -10px 100px #7B96B8;
    }
}

#pawn-promotion-option {
    width: 480px;
    height: 480px;
    line-height: 480px;
    position: absolute;
    background: transparent;
    text-align: center;
    font-size: 90px;
    cursor: default;
    z-index: 10;
}

#pawn-promotion-option .option {
    cursor: pointer;
}

/*========================================*/

.option-nav {
    height: 20px;
    width: 500px;
    font-size: 30px;
    margin: 0 auto;
	 line-height: 15px;
}

#player-nav {
    display: inline-block;
    cursor: default;
    float: left;
    width: 200px;
    text-align: left;
	 margin-top: 5px;
}

#player {
    font-size: 32px;
    color: #000;
}

#undo-btn, #option {
    display: inline-block;
    float: right;
    cursor: pointer;
    margin-left: 50px;
	 position: relative;
}

.btn .tooltiptext {
    visibility: hidden;
    font-family: monospace;
    width: 100px;
    background: #000;
    color: #ccc;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    line-height: 20px;
    font-size: 22px;
	
    position: absolute;
    z-index: 1;
    top: 120%;
    left: 50%;
    margin-left: -50px;
}

#undo-btn .tooltiptext {
	width: 80px;
	margin-left: -40px;
}

.btn .tooltiptext::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #000 transparent;
}

.btn:hover .tooltiptext {
    visibility: visible;
}

/*=================*/

#option-menu {
    width: 480px;
    height: 480px;
    position: absolute;
    background: transparent;
    text-align: center;
    font-size: 40px;
    cursor: default;
    z-index: 10;
    letter-spacing: 5px;

}

#back-btn {
    width: 100px;
    margin: 60px auto 0 auto;
}

#theme-menu {
    width: 100%;
    margin: 40px auto 0 auto;
}

#color-menu {
    width: 100%;
    margin: 40px auto 0 auto;
}

#restart-btn {
    width: 280px;
    margin: 40px auto 0 auto;;
}

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

网友评论0