JavaScript之2048 html

Posted fatinggoodboy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JavaScript之2048 html相关的知识,希望对你有一定的参考价值。

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <link rel="stylesheet" type="text/css" href="style.css">
    <title>2048</title>
</head>

<body>
    <div class="container" id="container">
        <div class="header">
            <h1 class="game-title">2048</h1>
            <div class="game-info">
                <span id="game-best-score">0</span>
                <span id="game-score">0</span>
                <button id="newGame" type="button">New Game</button>
            </div>
        </div>
        <div class="game-container" id="game-container">
            <div class="game-result">
                <p></p>
            </div>
            <div class="gird-container">
                <div class="gird-row">
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                </div>
                <div class="gird-row">
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                </div>
                <div class="gird-row">
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                </div>
                <div class="gird-row">
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                    <div class="gird-col"></div>
                </div>
            </div>
            <div class="tile-container" id="tile-container"></div>
        </div>
    </div>
    <script type="text/javascript" src="main.js"></script>
</body>

</html>

以上是关于JavaScript之2048 html的主要内容,如果未能解决你的问题,请参考以下文章

用JavaScript实现的2048.

javascript 2048游戏

详解matlab之简易2048制作

我的改进版2048之智能自己主动

JavaScript实现2048小游戏,我终于赢了一把

JavaScript小游戏--2048(PC端)