您当前的位置: 首页 >  游戏

slandarer

暂无认证

  • 1浏览

    0关注

    248博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

html 狗头小游戏祝大家情人节快乐

slandarer 发布时间:2020-02-06 18:34:18 ,浏览量:1

文章目录
      • 1 前言
      • 2 游戏规则
      • 3 游戏获取方式:
          • 3.1 自行组装
          • 3.2 CSDN内提取
          • 3.3 百度网盘提取
      • 4 游戏食用方法
      • 5 后记

1 前言

为了让大家度过一个愉快的情人节(七夕节,双十一)。 在这里给大家带来一款狗头小游戏。

2 游戏规则
  1. 每次游戏图案随机生成
  2. 当你点击其中一个狗狗图案的方块时,你所点击的方块及其四周的方块都会发生翻转,当所有的狗狗图案都相同时,游戏胜利!
  3. 游戏预览: 在这里插入图片描述
3 游戏获取方式: 3.1 自行组装

完整代码: dog.html




    
    
    


    
        
            初级
            中级
            高级
            重新开始
        
        
    
    


dog.css

#dog {
    margin: 100px auto;
}
.level{
    text-align: center;
    margin-bottom: 10px;

}
.level button{
    padding: 0px 0px;
    background-color: #02a4ad;
    border-color: #9be5ea;
    color: #fff;
    border-radius: 4px;
    border-width:1.2px;
    outline: none;
    cursor: pointer;
    width:80px;
    height:40px;
    text-align: center;
    font-size: 17px;
    margin-left: 10px;
    margin-left: 10px;

}
.level button.active{
    background-color: #0d8dd1;
}
table {
    border-spacing: 7px;
    background-color: #c1d6e8;
    margin: 0 auto;
}
td {
    padding: 0;
    width: 60px;
    height:60px;
    background: #ffffff;
    border: 4px solid;
    border-style: hidden;
}
.doga {
    background: #fcfbee url(images/doga.png) no-repeat center;
    background-size: cover;
}
.dogb {
    background: #def8fc url(images/dogb.png) no-repeat center;
    background-size: cover;
}

dog.js

function Dog(change_times) {
    this.row = 5;
    this.col = 5;
    this.change_times = change_times;
    this.squares = [];
    this.tds = [];
    this.parent = document.querySelector('.gameBox');
}
Dog.prototype.init = function () {
    for (var i = 0; i             
关注
打赏
1664692598
查看更多评论
0.0369s