<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>404页面</title>
</head>
<style>
    body,html{
        width: 100%;
        height: 100%;
        background: #f8f8f8;
        padding: 0;
        margin: 0;
    }
    .wrap-center{
        position:absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
    }
    .err-info-wrap{
        width: 100%;
        height: 100%;
        background: #ff5772;
    }
    #back-index-btn{
        width: 230px;
        height: 60px;
        line-height: 60px;
        color: #ffffff;
        font-size: 26px;
        border-radius: 10px;
        text-align: center;
        border: 1px solid #ffffff;
        position: absolute;
        top: 77%;
        left: 50%;
        transform: translateX(-50%);
    }
</style>
<body>
    <div class="err-info-wrap">
        <img src="/images/404.png" class="wrap-center" alt="">
        <div id="back-index-btn">返回首页(3s)</div>
    </div>
</body>
</html>
<script>
    var t=3;
    console.log(document.getElementById('back-index-btn'))
    var btn= document.getElementById('back-index-btn');
    var timer = null;
    timer = setInterval(function () {
        t--;
        if(t<0){
            window.location.href='https://www.youmayouzi.com';
            timer.clearInterval();
        }else {
            btn.innerHTML='返回首页('+t+'s)';
        }
    },1000)
</script>