效果预览

代码

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="https://www.cnblogs.com/beixuan">
<meta name="version" content="1.0.0">
<meta name="date" content="2021/12/02 21:00:26">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CSS动画大全之404[a]</title>
</head>
<style type="text/css"> <!-- 网络字体 -->
@import url("https://fonts.googleapis.com/css?family=Barlow+Condensed:300,400,500,600,700,800,900|Barlow:300,400,500,600,700,800,900&display=swap"); * {
margin: 0;
padding: 0;
} body {
background-color: #9e80ea;
font-family: "Barlow", sans-serif;
} a {
text-decoration: none;
color: #FFF;
} .menu {
position: absolute;
width: 100%;
height: 3.75rem;
display: grid;
grid-template-columns: 1fr 3fr;
justify-items: center;
align-items: center;
z-index: 10;
padding: 2% 5%;
box-sizing: border-box;
} .menu > .title > span {
padding: 0.7rem 1rem;
font-size: 1rem;
letter-spacing: 2px;
background-color: #FFF;
border-radius: 6px;
color: #8b70cc;
font-weight: 600;
opacity: 0.5;
transition: opacity 0.5s ease;
cursor: pointer;
} .menu > .title > span:hover {
opacity: 1;
} .menu-list-wrapper {
width: 100%;
list-style: none;
display: grid;
justify-items: center;
align-items: center;
justify-content: end;
grid-template-columns: 10% 10% 10% 10%;
} .menu-list-wrapper > .menu-list-item {
display: inline-block;
width: 100%;
text-align: center;
opacity: 0.5;
transition: opacity 0.5s ease;
} .menu-list-wrapper:hover .menu-list-item {
opacity: 1;
} .menu-list-item > a {
font-size: 1.25rem;
font-weight: 600;
letter-spacing: 1px;
position: relative;
transition: color 0.5s ease;
} .menu-list-item > a:hover {
color: #ff9b0f;
} .menu-list-item > a::after {
content: '';
position: absolute;
width: 0;
height: 5px;
left: 100%;
bottom: -6px;
border-radius: 3px;
transition: all 0.5s ease;
background: linear-gradient(to right, #e7dcff, #ff9b0f);
} .menu-list-item > a:hover::after {
width: 80%;
left: 0;
} .page-wrapper {
position: relative;
width: 100vw;
height: 100vh;
display: grid;
justify-items: center;
align-items: center;
overflow: hidden;
} .circle::after {
border-radius: 50%;
} .big-circle {
width: 60%;
height: 60%;
position: absolute;
top: 20%;
left: 20%;
animation: animeCircle 1s cubic-bezier(1, 0.06, 0.25, 1) both;
} .big-circle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50rem;
height: 50rem;
background-color: #793cb680;
box-shadow:
inset 5px 20px 40px rgb(54 24 79 / 25%),
inset 5px 0px 5px rgb(50 36 62 / 30%),
inset 5px 5px 20px rgb(50 36 62 / 25%),
2px 2px 5px rgb(0 0 0 / 50%);
} .smail-circle {
width: 60%;
height: 60%;
position: absolute;
top: 20%;
left: 20%;
animation-delay: 1s;
animation: animeCircle 1.2s cubic-bezier(1, 0.06, 0.25, 1) both;
} .smail-circle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 35rem;
height: 35rem;
background-color: #793cb680;
box-shadow:
inset 5px 20px 40px rgb(54 24 79 / 25%),
inset 5px 0px 5px rgb(50 36 62 / 30%),
inset 5px 5px 20px rgb(50 36 62 / 25%),
2px 2px 5px rgb(0 0 0 / 50%);
} .first {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 60%;
width: 12.5rem;
animation: animeContent 0.8s cubic-bezier(1, 0.06, 0.25, 1) backwards;
} .second {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 60%;
width: 12.5rem;
animation: animeContent 0.8s cubic-bezier(1, 0.06, 0.25, 1) backwards;
} .first > span {
position: absolute;
border-radius: 2rem;
background: linear-gradient(90deg, #55e3ea 13.7%, #ff910b 94.65%);
animation: pieceLeft 4s cubic-bezier(1, 0.06, 0.25, 1) infinite both;
} .first > span:nth-child(1) {
top: 5%;
width: 9rem;
right: -50%;
animation-delay: 2.5s;
animation-name: pieceRight;
height: 2.5rem;
} .first > span:nth-child(2) {
top: 55%;
left: -30%;
width: 8rem;
animation-delay: 2s;
animation-name: pieceLeft;
height: 2rem;
} .first > span:nth-child(3) {
bottom: 0;
left: -50%;
width: 7rem;
animation-delay: 3s;
animation-name: pieceLeft;
height: 1rem;
} .second > span {
position: absolute;
height: 2.5rem;
border-radius: 2rem;
background: linear-gradient(270deg, #7c9fff 13.7%, #f66fff 94.65%);
animation: pieceRight 4s cubic-bezier(1, 0.06, 0.25, 1) infinite both;
} .second > span:nth-child(1) {
top: calc(10% + 40px);
left: -50%;
width: 7rem;
animation-delay: 3s;
animation-name: pieceLeft;
} .second > span:nth-child(2) {
top: calc(50% - 40px);
right: -50%;
width: 9rem;
animation-delay: 3s;
animation-name: pieceRight;
} .second > span:nth-child(3) {
bottom: calc(5% + 16px);
right: -20%;
width: 8rem;
animation-delay: 2s;
animation-name: pieceRight;
height: 1rem;
} .text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
font-size: 16rem;
font-weight: 600;
color: #FFF;
animation-delay: 1s !important;
animation: anime404 0.6s cubic-bezier(0.3, 0.8, 1, 1.05) both;
} .text-bg {
z-index: 1;
color: #3f005f;
filter: blur(10px);
opacity: 0.8;
animation-delay: 0.8s !important;
animation: anime404 0.6s cubic-bezier(0.3, 0.8, 1, 1.05) both;
} .detail {
font-size: 24px;
color: #fff;
z-index: 3;
transform: translateY(200px);
text-align: center;
height: 120px;
position: relative;
} .detail > .btn {
font-size: 16px;
border-radius: 50px;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
background: #E7DCFF;
color: #000000;
transition: all 0.6s ease;
padding: 0.5rem 1rem;
cursor: pointer;
} .detail > .btn:hover {
background: #ff496a;
color: #ffffff;
transform: translate(-50%, 8px);
} @keyframes pieceLeft {
50% {
left: 100%;
width: 30%;
}
} @keyframes pieceRight {
50% {
right: 100%;
width: 50%;
}
} @keyframes anime404 {
0% {
opacity: 0;
transform: scale(10) skew(20deg, 20deg);
}
} @keyframes animeCircle {
0% {
transform: scale(0);
}
} @keyframes animeContent {
0% {
width: 0;
}
} @media screen and (max-width: 960px) {
.text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
font-size: 8rem;
font-weight: 600;
color: #FFF;
animation-delay: 1s !important;
animation: anime404 0.6s cubic-bezier(0.3, 0.8, 1, 1.05) both;
} .big-circle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 25rem;
height: 25em;
background-color: #793cb680;
box-shadow:
inset 5px 20px 40px rgb(54 24 79 / 25%),
inset 5px 0px 5px rgb(50 36 62 / 30%),
inset 5px 5px 20px rgb(50 36 62 / 25%),
2px 2px 5px rgb(0 0 0 / 50%);
} .smail-circle::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 15rem;
height: 15rem;
background-color: #793cb680;
box-shadow:
inset 5px 20px 40px rgb(54 24 79 / 25%),
inset 5px 0px 5px rgb(50 36 62 / 30%),
inset 5px 5px 20px rgb(50 36 62 / 25%),
2px 2px 5px rgb(0 0 0 / 50%);
} .menu-list-wrapper {
display: none;
} .smail-menu-list-wrapper {
width: 100%;
display: grid;
justify-items: center;
align-items: center;
justify-content: end;
grid-template-columns: 20%;
position: relative;
} .smail-menu-list-wrapper > div {
position: absolute;
right: 0;
width: 40px;
height: 40px;
display: grid;
justify-items: center;
align-items: center;
cursor: pointer;
} .smail-menu-list-wrapper > div:hover span {
background: #ff9410;
} .smail-menu-list-wrapper > div:hover span::before {
transform: translateY(-10px);
} .smail-menu-list-wrapper > div:hover span::after {
transform: translateY(10px);
} .smail-menu-list-wrapper span {
width: 24px;
height: 2px;
background: #FFF;
position: absolute;
} .smail-menu-list-wrapper span::before {
content: '';
transform: translateY(-8px);
position: absolute;
width: 100%;
height: 100%;
background: inherit;
transition: all 0.4s ease;
} .smail-menu-list-wrapper span::after {
content: '';
transform: translateY(8px);
position: absolute;
width: 100%;
height: 100%;
background: inherit;
transition: all 0.4s ease;
}
} </style> <body>
<!-- MENU -->
<nav>
<div class="menu">
<div class="title">
<span>BeiXuan</span>
</div>
<ul class="menu-list-wrapper">
<li class="menu-list-item">
<a href="#">Home</a>
</li>
<li class="menu-list-item">
<a href="#">Shop</a>
</li>
<li class="menu-list-item">
<a href="#">Help</a>
</li>
<li class="menu-list-item">
<a href="#">Page</a>
</li>
</ul>
<div class="smail-menu-list-wrapper">
<div>
<span></span>
</div>
</div>
</div>
</nav>
<div class="page-wrapper">
<!-- Big Circle -->
<div class="big-circle circle"></div>
<!-- Smail Circle -->
<div class="smail-circle circle"></div>
<!-- move box First -->
<div class="first">
<span></span>
<span></span>
<span></span>
</div>
<!-- move box Second -->
<div class="second">
<span></span>
<span></span>
<span></span>
</div> <p class="text">404</p>
<p class="text text-bg">404</p> <div class="detail">
<p>NNNNNNO! 您要找的页面走丢了..</p>
<span class="btn">返回首页</span>
</div>
</div>
</body>
</html>

【全】CSS动画大全之404页面【a】的更多相关文章

  1. 如何利用 CSS 动画原理,在页面上表现日蚀现象

    效果预览 在线演示 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/OELvrK 可交互视频教 ...

  2. 前端每日实战:36# 视频演示如何利用 CSS 动画原理,在页面上表现日蚀现象

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/OELvrK 可交互视频教程 此视频 ...

  3. 36纯 CSS 动画原理,在页面上表现日蚀现象

    原文地址:https://segmentfault.com/a/1190000015070543 感想: 动画,背景颜色 HTML code: <div class="sky" ...

  4. css3动画响应式404页面

    PC端效果: 模拟触屏端效果: 兼容性:触屏端及桌面端(优雅降级至IE6) 模板下载: http://pan.baidu.com/s/1o67ftc2

  5. 【2016年特别福利】史上最全CSS学习资料大全

    css学习篇 [2016年特别福利]史上最全CSS学习资料大全

  6. web前端学习(三)css学习笔记部分(5)-- CSS动画--页面特效、HTML与CSS3简单页面效果实例

    CSS动画--页面特效部分内容目前仅仅观看了解内容,记录简单笔记,之后工作了进行内容的补充 7.  CSS动画--页面特效 7.1  2D.3D转换 7.1.1  通过CSS3转换,我们能够对元素进行 ...

  7. CSS动画与GPU

    写在前面 满世界的动画性能优化技巧,例如: 只允许改变transform.opacity,其它属性不要动,避免重新计算布局(reflow) 对动画元素应用transform: translate3d( ...

  8. 全新jquery多点滑动幻灯片——全屏动画animateSlide

    首页banner的酷炫效果多来自全屏大图的幻灯片动画,下面提供一种完美兼容的jquery动画特效:全新jquery多点滑动幻灯片——全屏动画animateSlide(代码完全原创). 直接上代码,把h ...

  9. 这样使用 GPU 渲染 CSS 动画(转)

    大多数人知道现代网络浏览器使用GPU来渲染部分网页,特别是具有动画的部分. 例如,使用transform属性的CSS动画看起来比使用left和top属性的动画更平滑. 但是如果你问,“我如何从GPU获 ...

  10. CSS动画原理及硬件加速

    一.图层 图层即层叠上下文,具体概念和应用大家可以看我之前转自张鑫旭大神博客的<CSS层叠上下文和层叠顺序>,这里我们简单复习一下产生层叠上下文的原因. 1.根层叠上下文 指的是页面根元素 ...

随机推荐

  1. 【原创】EtherCAT主站IgH解析(二)-- Linux/Windows/RTOS等多操作系统IgH EtherCAT主站移植指南

    版权声明:本文为本文为博主原创文章,转载请注明出处.如有问题,欢迎指正.博客地址:https://www.cnblogs.com/wsg1100/ 前言 目前,EtherCAT商用主站有:Aconti ...

  2. 使用 GPU 进行 Lightmap 烘焙 - 简单 demo

    作者:i_dovelemon 日期:2024-06-16 主题:Lightmap, PathTracer, Compute Shader 引言 一直以来,我都对离线 bake lightmap 操作很 ...

  3. 高通Android Cam-x Actuator Bring up

    高通Android Camera Bring Up Actuator reference:https://blog.csdn.net/mr_zjc/article/details/105736925 ...

  4. power bi创建切片器导航

    现在很多报告使用的是按钮导航,今天分享另外一种方式:切片器导航. 第一步: 新建一个页面导航表,主页-输入数据-[填写列名,每页报表的表名] 如图: [页面导航表] 第二步: 添加一个切片器,将页面导 ...

  5. helloworld - 程序员的第一个社区终于来了

    helloworld - 程序员的第一个社区终于来了 csdn事件 CSDN旗下的GitCode最近因为一种极其不道德的行为引起了开发者的广泛愤怒和抗议.CSDN在没有通知或征求开发者同意的情况下,悄 ...

  6. P9196 题解

    来一份线性时间的题解. 考虑先解决前缀限制,显然可以直接把字符串和询问全部搬到 Trie 树上,问题就变成了查询一个子树内满足后缀限制的字符串数量. 接着考虑 Trie 树合并,具体地,把后缀限制以及 ...

  7. CosyVoice多语言、音色和情感控制模型,one-shot零样本语音克隆模型本地部署(Win/Mac),通义实验室开源

    近日,阿里通义实验室开源了CosyVoice语音模型,它支持自然语音生成,支持多语言.音色和情感控制,在多语言语音生成.零样本语音生成.跨语言声音合成和指令执行能力方面表现卓越. CosyVoice采 ...

  8. Ez Forensics详解

    Ez Forensics详解 题目要求: 数据库版本 + 字符集格式 + 最长列名 示例:NSSCTF 步骤: 解压压缩包得到forensics.vmdk,.vmdk是虚拟机磁盘文件的元数据文件 可以 ...

  9. 做一个单纯的react-image显示组件

    最近项目上有一个需求,在显示图片的时候,需要传递自定义的头部就行认证.google了一番之后,发现没有现成的组件库可以使用[也可能是我没找到],所以请求图片只能采用xhr方式来异步加载.下面就是在做这 ...

  10. yb课堂 搭建node环境和npm安装 《二十六》

    搭建node环境和npm安装 什么是NodeJS? Node.js就是运行在服务端得JavaScript 什么是npm? nodejs的包管理工具,可以下载使用公共仓库的包,类似maven包安装分为本 ...