404 页面代码

javascript 复制代码
<template>
<div class="container">
 <h1>404</h1>
<div >
  <p class="text-center">当前页面无法访问,可能没有权限或已删除</p>
  <p class="text-center"> 去别处看看吧</p>
</div>
</div>
</template>
<script setup lang='ts'>
 
</script> 
<style lang="scss" scoped>
h1 {
 
  font-size: 6rem;
  animation: shake .6s ease-in-out infinite alternate;
  display: flex;
  height: 50vh;
  justify-content: center;
  align-items: end;
}
.text-center{
  display: flex;
  justify-content: center;
  font-size: 22px;
}

@keyframes shake {
  0% {
    transform: translate(-10px)
  }
  
  25% {
    transform: translate(-20px, 1px)
  }
  
  50% {
    transform: translate(-30px, -1px)
  }
  
  
  
  75% {
    transform: translate(-20px, -2px) 
    skewY(-8deg) scaleX(.96);
    filter: blur(0)
  }
  
  100% {
    transform: translate(-10px, -1px)
  }
}
h1:before {
    content: attr(data-t);
    position: absolute;
    left: 50%;
    transform: translate(-50%,.34em);
    height: .1em;
    line-height: .5em;
    width: 100%;
    animation: scan .5s ease-in-out 275ms infinite alternate,glitch-anim .3s ease-in-out infinite alternate;
    overflow: hidden;
    opacity: .7;
}

@keyframes glitch-anim {
    0% {
        clip: rect(32px,9999px,28px,0)
    }

    10% {
        clip: rect(13px,9999px,37px,0)
    }

    20% {
        clip: rect(45px,9999px,33px,0)
    }

    30% {
        clip: rect(31px,9999px,94px,0)
    }

    40% {
        clip: rect(88px,9999px,98px,0)
    }

    50% {
        clip: rect(9px,9999px,98px,0)
    }

    60% {
        clip: rect(37px,9999px,17px,0)
    }

    70% {
        clip: rect(77px,9999px,34px,0)
    }

    80% {
        clip: rect(55px,9999px,49px,0)
    }

    90% {
        clip: rect(10px,9999px,2px,0)
    }

    to {
        clip: rect(35px,9999px,53px,0)
    }
}

@keyframes scan {
    0%,20%,to {
        height: 0;
        transform: translate(-50%,.44em)
    }

    10%,15% {
        height: 1em;
        line-height: .2em;
        transform: translate(-55%,.09em)
    }
}
h1:after {
    content: attr(data-t);
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translate(-50%,.34em);
    height: .5em;
    line-height: .1em;
    width: 100%;
    animation: scan 665ms ease-in-out .59s infinite alternate,glitch-anim .3s ease-in-out infinite alternate;
    overflow: hidden;
    opacity: .8
}
</style>
相关推荐
掘金安东尼3 分钟前
VSCode V1.107 发布(2025 年 11 月)
前端·visual studio code
一只小阿乐7 分钟前
前端vue3 web端中实现拖拽功能实现列表排序
前端·vue.js·elementui·vue3·前端拖拽
AAA阿giao12 分钟前
从“操纵绳子“到“指挥木偶“:Vue3 Composition API 如何彻底改变前端开发范式
开发语言·前端·javascript·vue.js·前端框架·vue3·compositionapi
TextIn智能文档云平台18 分钟前
图片转文字后怎么输入大模型处理
前端·人工智能·python
专注前端30年20 分钟前
在日常开发项目中Vue与React应该如何选择?
前端·vue.js·react.js
文刀竹肃34 分钟前
DVWA -XSS(DOM)-通关教程-完结
前端·安全·网络安全·xss
lifejump37 分钟前
Pikachu | XSS
前端·xss
进击的野人41 分钟前
Vue 组件与原型链:VueComponent 与 Vue 的关系解析
前端·vue.js·面试
馬致远1 小时前
Vue todoList案例 优化之本地存储
前端·javascript·vue.js
请叫我聪明鸭1 小时前
CSS实现单行、多行文本超长显示 / 不超长隐藏、悬浮窗超长展示/不超长隐藏、悬浮窗手动控制样式
前端·javascript·css