雪花代码

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>文件下载</title>
    <script>
        window.onload = function() {
            clickToHref();
        }

        function clickToHref() {
            var eles = document.querySelectorAll("div[href]");
            eles.forEach(function(item) {
                item.addEventListener("click", function() {
                    var href = item.getAttribute("href");
                    var target = item.getAttribute("target");
                    if (!target) {
                        location.href = href;
                    } else {
                        window.open(href, target);
                    }
                });
            })
        }

        function deleteFile(path) {
            event.stopPropagation();
            var httpRequest = new XMLHttpRequest();
            var url = "http://172.16.71.247:28801/wkdelete?path=" + path;
            alert(url);

            httpRequest.open('GET', url, true);
            httpRequest.send();
            httpRequest.onreadystatechange = function() {
                window.location.reload();
            };
        }
    </script>
    <style>
        .windmill__sun {
            position: absolute;
            height: 30px;
            width: 30px;
            top: 250px;
            left: 10%;
            border-radius: 100%;
            background: #B6E2FF;
            box-shadow: 0 0 300px 80px #B6E2FF, 0 0 200px 40px #B6E2FF, 0 0 50px 10px #B6E2FF;
        }
        
        .windmill__snowflake {
            position: absolute;
            background-color: #B6E2FF;
            transform: rotate(45deg);
            height: 10px;
            width: 10px;
            animation: snowflake 10s linear infinite;
            opacity: .5;
        }
        
        .windmill__snowflake:nth-child(1) {
            left: 100px;
            top: -23px;
            animation-delay: 0s;
        }
        
        .windmill__snowflake:nth-child(2) {
            left: 800px;
            top: -100px;
            animation-delay: 1s;
        }
        
        .windmill__snowflake:nth-child(3) {
            left: 1200px;
            top: -42px;
            animation-delay: 2s;
        }
        
        .windmill__snowflake:nth-child(4) {
            left: 356px;
            top: -15px;
            //animation-delay: 3s;
        }
        
        .windmill__snowflake:nth-child(5) {
            left: 1600px;
            top: -90px;
        }
        
        .windmill__snowflake:nth-child(6) {
            left: 610px;
            top: -50px;
            animation-delay: 2s;
        }
        
        .windmill__snowflake:nth-child(7) {
            left: 840px;
            top: -123px;
            animation-delay: 1s;
        }
        
        .windmill__snowflake:nth-child(8) {
            left: 2000px;
            top: -37px;
            animation-delay: 3s;
        }
        
        .windmill__snowflake:nth-child(9) {
            left: 1320px;
            top: -200px;
            animation-delay: 1s;
        }
        
        .windmill__snowflake:nth-child(10) {
            left: 954px;
            top: -100px;
            animation-delay: 2s;
        }
        
        @keyframes blades {
            100% {
                transform: rotate(-360deg);
            }
        }
        
        @keyframes cloud {
            0% {
                transform: translateX(1000px);
            }
            50% {
                transform: translateX(800px);
            }
            100% {
                transform: translateX(0);
            }
        }
        
        @keyframes snowflake {
            0% {
                transform: rotate(45deg) translateX(0) translateY(0px);
            }
            20% {
                transform: rotate(45deg) translateX(-100px) translateY(240px);
            }
            40% {
                transform: rotate(45deg) translateX(-40px) translateY(480px);
            }
            60% {
                transform: rotate(45deg) translateX(-100px) translateY(720px);
            }
            80% {
                transform: rotate(45deg) translateX(-40px) translateY(960px);
            }
            100% {
                transform: rotate(45deg) translateX(-10px) translateY(1200px);
            }
        }
        
        body {
            margin: 0;
            padding: 0;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 62.5%;
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
        }
        
        .rootDiv {
            position: absolute;
            width: 100%;
            text-align: left;
            min-height: 100%;
            background-color: #6096C4;
        }
        
        a:hover {
            color: #DAA520;
        }
        
        a {
            color: #FFD700;
            font-size: 16px;
            font-family: Helvetica, Arial, "PingFang SC", "lucida grande", "lucida sans unicode", lucida, helvetica, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
        }
        
        table {
            *border-collapse: collapse;
            border-spacing: 0;
            width: 100%;
            font-size: 16px;
        }
        
        .zebra td,
        .zebra th {
            padding: 10px;
            border-bottom: 1px solid #DCDCDC;
        }
        
        .zebra .highlight,
        .zebra tr:hover td {
            background: #A9A9A999;
        }
        
        .zebra .alternate,
        .zebra tbody tr:nth-child(even) {
            background: #DCDCDCAA;
        }
        
        .zebra tbody tr:nth-child(odd) {
            background: #F5F5F5DD;
        }
        
        .zebra th {
            text-align: left;
            background-color: #F1F1F1;
        }
        
        .zebra th:first-child {
            -moz-border-radius: 0 0 0 0;
            -webkit-border-radius: 0 0 0 0;
            border-radius: 0 0 0 0;
        }
        
        .zebra th:last-child {
            -moz-border-radius: 0 0 0 0;
            -webkit-border-radius: 0 0 0 0;
            border-radius: 0 0 0 0;
        }
        
        .container {
            width: 800px;
            font-size: 2em;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 6px 6px 24px rgba(0, 0, 0, 0.1);
            cursor: pointer;
            margin: 30px auto;
        }
        
        .container .box {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            height: 80px;
            padding: 0px 20px;
            transition: all 0.3s;
            color: white;
        }
        
        .attribute {
            justify-content: space-between;
            display: flex;
            align-items: center;
            font-size: 1.2em;
            width: 250px;
        }
        
        .deleteBtn {
            text-decoration: none;
            font-size: 0.8em
        }
        
        .container .box.box5 {
            background-color: rgb(105, 155, 47);
        }
        
        .container .box.box6 {
            background-color: rgb(80, 230, 205);
        }
        
        .container .box.box1 {
            background-color: #7986CB;
        }
        
        .container .box.box2 {
            background-color: #FF8A65;
        }
        
        .container .box.box3 {
            background-color: #F06292;
        }
        
        .container .box.box4 {
            background-color: #4DB6AC;
        }
        
        .container .box .name {
            width: 300px;
        }
        
        .container .box .name h4,
        .container .box .name h5 {
            font-weight: 300;
        }
        
        .container .box .name h5 {
            font-size: 0em;
            line-height: 1.5;
        }
        
        .container .box p {
            font-size: 0.8em;
            font-weight: 300;
        }
        
        .container .box:before {
            content: "";
            height: 0px;
            width: 0px;
            border: 2px solid white;
            border-radius: 50%;
            margin-left: -20%;
            background-color: white;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
        }
        
        .container .box.box1:before,
        .container .box.box3:before,
        .container .box.box5:before {
            background-image: url("img/011-girl.png");
        }
        
        .container .box.box2:before,
        .container .box.box4:before,
        .container .box.box6:before {
            background-image: url("http://img.tukexw.com/img/d15e5645d5c69270.jpg");
        }
        
        .container .box:hover:before {
            content: "";
            height: 50px;
            width: 50px;
            border-radius: 50%;
            margin-left: 0%;
            transition: all 0.4s;
        }
        
        .container .box:hover {
            height: 120px;
            transition: all 0.3s;
        }
        
        .container .box:hover .name h5 {
            font-size: 1.2em;
            transition: all 0.6s;
        }
        
        * {
            margin: 0px;
            padding: 0px;
            box-sizing: border-box;
        }
    </style>

</head>

<body>

    <div class="rootDiv">
        <div class="windmill__sun"></div>
        <div class="container">
            <div class="box box5" href="http://172.16.71.247:28801/wkuploadfile.html">
                <div class="name">
                    <h4>根目录</h4>
                    <h5>版本10.1</h5>
                </div>
                <div class="attribute">
                </div>
            </div>
            <div class="box box4" href="http://172.16.71.247:28801/wkuploadfile.html">
                <div class="name">
                    <h4>上传文件</h4>
                    <h5></h5>
                </div>
                <div class="attribute">
                </div>
            </div>
            <div class="box box1" href="http://172.16.71.247:28801/wkuploadfile.html">
                <div class="name">
                    <h4>王家荣111111111111122.txt</h4>
                    <h5>1000MB</h5>

                </div>
                <div class="attribute">
                    <p>2018-12-26 16:10:13</p>
                    <a onclick="javascript:deleteFile('upload/1.png')" class="deleteBtn">删除</a>
                </div>
            </div>
            <div class="box box2">
                <div class="name">
                    <h4>Tap here</h4>
                    <h5>Hi</h5>
                </div>
                <div class="attribute">
                    <p>2018-12-26 16:10:13</p>
                    <a onclick="javascript:deleteFile('upload/1.png')" class="deleteBtn">删除</a>
                </div>
            </div>
            <div class="box box3">
                <div class="name">
                    <h4>Tap here</h4>
                    <h5>Bye</h5>
                </div>
                <div class="attribute">
                    <p>2018-12-21 16:10:13</p>
                    <a onclick="javascript:deleteFile('upload/1.png')" class="deleteBtn">删除</a>
                </div>
            </div>
            <div class="box box4">
                <div class="name">
                    <h4>Tap here</h4>
                    <h5>Bye!</h5>
                </div>
                <div class="attribute">
                    <p>2018-12-24 16:10:13</p>
                    <a onclick="javascript:deleteFile('upload/1.png')" class="deleteBtn">删除</a>
                </div>
            </div>

        </div>


        <table class="zebra">
            <thead>
                <tr>
                    <th>#</th>
                    <th>文件名</th>
                    <th>时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td style="width:30px">1</td>
                    <td><a href="wkdownload?path=upload">upload</a><br/>
                    </td>
                    <td style="width:180px">2018-12-29 14:59:27</td>
                    <td style="width:100px"><a href="wkdelete?path=upload">删除</a><br/>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>



    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>
    <div class="windmill__snowflake"></div>


</body>

</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值