HTML5-打字游戏

在网上找了一个HTML5的代码,照着敲了一下。发现收获还是蛮大的。而这个代码大多数是使用jq来写的。对于刚学js不久的自己也算是学习jq的一个不错的项目。游戏效果图如下:

这个图是只写好html和css的图:


这两个是写好的代码效果:




HTML代码:

<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>HTML5金山打字游戏源码</title>
        <script src="jquery.js"></script>
        <script src="js.js"></script>
        <script>
        $(function(){
            new typegame();
        });
        </script>
    </head>
    <style>
        body{
            margin:0;
            background:url(game.jpg) no-repeat;
            background-size:cover;
            font-family:"幼圆";
            background:#E8F0F0;
            overflow:hidden;
        }
        .stop1{
            width:130px;
            height:50px;
            background:red;
            position:absolute;
            bottom:0;
            left:30px;
            text-align:center;
            cursor:pointer;
            background:url("stop.png");
            background-size:130px 50px;
            line-height:50px;
            color:#392112;
            font-size:16px;
            z-index: 6666666;
            font-weight:bold;
        }
        .screen1{
            width:100%;
            height:100%;
            background:url(img/dz2.jpg) no-repeat;
            background-size:cover;
            margin:0 auto;
            padding:0;
            position:relative;
            overflow:hidden;
        }
        .xiabian{
            width:100%;
            height:40px;
            background:#000;
            position:absolute;
            bottom:0;
            right:0;
            opacity:0.8;
            filter:alpha(opacity=80);
        }
   
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值