使用JS实现俄罗斯方块游戏

使用JS实现俄罗斯方块游戏

 简单的JS俄罗斯方块游戏源码

  效果图:

 

 代码如下,复制即可使用:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>使用JS实现俄罗斯方块游戏</title>

<style type="text/css">
    
    .MainFrame
    {
      
        border: 1px solid burlywood;
        margin: 10px auto;
        position: relative;
        background-color: silver;
    }
    
    .MainFramediv
    {
      
        float: left;
        margin: 1px;
        position: absolute;
        /*z-index: -1;*/
    }
    
    .smallDiv
    {
      
        margin: 1px;
        position: absolute;
    }
    
    .smallDivblack
    {
      
        /*float: left;*/
        margin: 1px;
        /*margin: 1px;*/
        position: absolute;
        /*z-index: 2;*/
    }
    
    #tetris{
      
        width: 50%;
        margin: 0 auto;
        padding: 0;
        /*border: 1px solid silver;*/
    }
    #tetris:after{
      
        content:  "";
        Display:  block;
        Clear:  both;
    }
    
    #control{
      
        float: left;
        border: 1px solid silver;
        width: 150px;
        height: 578px;
        margin-top: 10px;
        margin-left: 20px;
        padding-top: 30px;
        font-size: 24px;
        font-weight: 400;
        color: blue;
        text-align: center;
    }
    #level,#regame{
      
        width: 100px;
        height: 30px;
        border: 1px solid blue;
        font-size: 16px;
        color: red;
        font-weight: 300;
    }
    #control p{
      
        margin-top: 200px;
    }
    #regame{
      
        margin-top: 100px;
        font-weight: 600;
        background-color: azure;
    }
    
    
    #TFrime{
      
        float: left;
    }
    
    
    #info{
      
        float: left;
        border
  • 7
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值