【全】CSS动画大全之404页面【a】
效果预览

代码
<!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】的更多相关文章
- 如何利用 CSS 动画原理,在页面上表现日蚀现象
效果预览 在线演示 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/OELvrK 可交互视频教 ...
- 前端每日实战:36# 视频演示如何利用 CSS 动画原理,在页面上表现日蚀现象
效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/OELvrK 可交互视频教程 此视频 ...
- 36纯 CSS 动画原理,在页面上表现日蚀现象
原文地址:https://segmentfault.com/a/1190000015070543 感想: 动画,背景颜色 HTML code: <div class="sky" ...
- css3动画响应式404页面
PC端效果: 模拟触屏端效果: 兼容性:触屏端及桌面端(优雅降级至IE6) 模板下载: http://pan.baidu.com/s/1o67ftc2
- 【2016年特别福利】史上最全CSS学习资料大全
css学习篇 [2016年特别福利]史上最全CSS学习资料大全
- web前端学习(三)css学习笔记部分(5)-- CSS动画--页面特效、HTML与CSS3简单页面效果实例
CSS动画--页面特效部分内容目前仅仅观看了解内容,记录简单笔记,之后工作了进行内容的补充 7. CSS动画--页面特效 7.1 2D.3D转换 7.1.1 通过CSS3转换,我们能够对元素进行 ...
- CSS动画与GPU
写在前面 满世界的动画性能优化技巧,例如: 只允许改变transform.opacity,其它属性不要动,避免重新计算布局(reflow) 对动画元素应用transform: translate3d( ...
- 全新jquery多点滑动幻灯片——全屏动画animateSlide
首页banner的酷炫效果多来自全屏大图的幻灯片动画,下面提供一种完美兼容的jquery动画特效:全新jquery多点滑动幻灯片——全屏动画animateSlide(代码完全原创). 直接上代码,把h ...
- 这样使用 GPU 渲染 CSS 动画(转)
大多数人知道现代网络浏览器使用GPU来渲染部分网页,特别是具有动画的部分. 例如,使用transform属性的CSS动画看起来比使用left和top属性的动画更平滑. 但是如果你问,“我如何从GPU获 ...
- CSS动画原理及硬件加速
一.图层 图层即层叠上下文,具体概念和应用大家可以看我之前转自张鑫旭大神博客的<CSS层叠上下文和层叠顺序>,这里我们简单复习一下产生层叠上下文的原因. 1.根层叠上下文 指的是页面根元素 ...
随机推荐
- ITMS-90717: 无效的应用程序商店图标
PS导入照片 图像->模式->索引颜色 透明度去掉打勾保存即可
- 前端Uncaught (in promise) 的解决方法及原因
问题:在Vue项目中使用axios调用一个第三方的接口时,前端无法获取到接口返回值,检查控制台Network发现接口请求已经正常发出并且有数据返回,但是控制台Console报了这么一个错误 上图可以看 ...
- poj1338 ugly number 题解 打表
类似的题目有HDU1058 humble number(翻译下来都是丑陋的数字). Description Ugly numbers are numbers whose only prime fact ...
- 关于Collection和Map的笔记
此二者在日常编程中,用得太频繁,所以多少有必要记录下,便于需要的时候翻翻. 但鉴于它们的后代太多,逐一牢记有有点难度,所以学习上应该把握以下几点即可: 含义 重要区别 常用的实现类和工具 关注要点:有 ...
- 初识python day1记录
程序语言中的分类 在程序中有分为高级语言Java python go与低级语言C 汇编,每种语言都有自己的规则,但是最终目的都是给计算机识别的,所以他的底层肯定是一些二进制010101,像java/p ...
- NXP i.MX 8M Plus工业开发板规格书(四核ARM Cortex-A53 + 单核ARM Cortex-M7,主频1.6GHz)
1 评估板简介 创龙科技TLIMX8MP-EVM是一款基于NXP i.MX 8M Plus的四核ARM Cortex-A53 + 单核ARM Cortex-M7异构多核处理器设计的高性能工业评估板 ...
- Windows Android 子系统(WSA)安装
除了Linux子系统WSL,微软还提供了安卓子系统WSA.不过对国内好像不太友好,安装也不方便. 这里说一下我的安装方法,但是可能时效性很强,现在是2022-01-20,如果日期离得太远可能不好使. ...
- UNR #7 Day2 T1 火星式选拔题解
放一个比赛链接 先考虑打完暴力后 \(k = 1\) 的特殊性质. 当队列容量为 \(1\) 时,队中的人 \(i\) 会被第一个满足 \(i \leq j\) 且 \(b_i \leq a_j\) ...
- Java 自定义注解校验字段唯一性
业务场景 在项目中,某些情景下我们需要验证编码是否重复,账号是否重复,身份证号是否重复等... 那么有没有办法可以解决这类似的重复代码量呢? 我们可以通过自定义注解校验的方式去实现,在实体类上面加上自 ...
- LabVIEW Actor Framwork (1)________ 边学边做server&client
初始需求: 现在要做一个类似聊天的demo,一个server端,若干个client端:首先是server启动,通过server可以打开若干个client端,然后每个client可以独立给server发 ...