【全】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.根层叠上下文 指的是页面根元素 ...
随机推荐
- DHorse的配置文件
首先看一下DHorse的配置文件,如下: #============================================================================== ...
- SQLite vs MySQL vs PostgreSQL对比总结
开发业务系统时,是绕不开RDBMS(关系型数据库)的.虽然现在诞生了各种NoSQL的数据库,RDBMS在业务系统中的严谨和优势依然无法取代. 近几年大大小小的项目中,常用的三种RDBMS(SQLite ...
- python + pytestTestreport生成测试报告_报告没有生成图标和报告样式错乱
pytestreport 生成测试报告的问题 1.生成报告html页面的样式错乱 2.生成报告html页面的图标没有展示 3. 生成报告html页面的查询详情按钮点击没有相应 问题排除: 浏览器开发者 ...
- Redis八股文(大厂面试真题)
号:tutou123com我是小宋编码,Java程序员 ,只熬夜但不秃头. 关注我,带你轻松过面试.提升简历亮点如果你觉得对你有帮助,欢迎关注[1] 内容目录 1.说说redis,了解redis源码 ...
- .NET项目中使用HtmlSanitizer防止XSS攻击
.NET项目中使用HtmlSanitizer防止XSS攻击 前言 最近博客也是上线了留言板功能,但是没有做审核(太懒了),然后在留言的时候可以输入<script>alert('xss')& ...
- ARM平台实现Docker容器技术
什么是Docker? (1)Docker的架构 Docker是一个开源的应用容器引擎,让开发者可打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的Linux或Windows机器上, ...
- “国产双系统”出炉,RK3568J非对称AMP:Linux+RTOS/裸机
"非对称AMP"双系统是什么 AMP(Asymmetric Multi-Processing),即非对称多处理架构."非对称AMP"双系统是指多个核心相对独立运 ...
- require模块化 AMD和CMD
在CommonJS中,有一个全局性方法require(),用于加载模块.假定有一个数学模块math.js,就可以像下面这样加载. 1 var math = require('math'); 然后,就可 ...
- 数据源dataSource以及事务tx的xml文件配置方式及代码配置方式
所需要使用的依赖 <dependencies> <!--spring jdbc Spring 持久化层支持jar包--> <dependency> <grou ...
- 2 - 【RocketMQ 系列】CentOS 7.6 安装部署RocketMQ
二.开始安装部署RocketMQ 官方网站:https://rocketmq.apache.org/ 各版本要求: 1.版本选取 下载地址: https://github.com/apache/roc ...