CSS3动画制作一个卡通风格的404错误页面代码
更新:2020-04-19 12:00:36
人气:4969
来源:本站原创
A+
CSS3动画制作一个卡通风格的404错误页面代码(有动画效果)
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Css 404错误页</title> <style> .error-container { text-align: center; font-size: 106px; font-family: "Catamaran", sans-serif; font-weight: 800; margin: 70px 15px; } .error-container > span { display: inline-block; position: relative; } .error-container > span.four { width: 136px; height: 43px; border-radius: 999px; background: linear-gradient( 140deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.07) 43%, transparent 44%, transparent 100% ), linear-gradient( 105deg, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.06) 41%, rgba(0, 0, 0, 0.07) 76%, transparent 77%, transparent 100% ), linear-gradient(to right, #d89ca4, #e27b7e); } .error-container > span.four:before, .error-container > span.four:after { content: ""; display: block; position: absolute; border-radius: 999px; } .error-container > span.four:before { width: 43px; height: 156px; left: 60px; bottom: -43px; background: linear-gradient( 128deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.07) 40%, transparent 41%, transparent 100% ), linear-gradient( 116deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.07) 50%, transparent 51%, transparent 100% ), linear-gradient(to top, #99749d, #b895ab, #cc9aa6, #d7969e, #e0787f); } .error-container > span.four:after { width: 137px; height: 43px; transform: rotate(-49.5deg); left: -18px; bottom: 36px; background: linear-gradient( to right, #99749d, #b895ab, #cc9aa6, #d7969e, #e0787f ); } .error-container > span.zero { vertical-align: text-top; width: 156px; height: 156px; border-radius: 999px; background: linear-gradient( -45deg, transparent 0%, rgba(0, 0, 0, 0.06) 50%, transparent 51%, transparent 100% ), linear-gradient( to top right, #99749d, #99749d, #b895ab, #cc9aa6, #d7969e, #ed8687, #ed8687 ); overflow: hidden; animation: bgshadow 5s infinite; } .error-container > span.zero:before { content: ""; display: block; position: absolute; transform: rotate(45deg); width: 90px; height: 90px; background-color: transparent; left: 0px; bottom: 0px; background: linear-gradient( 95deg, transparent 0%, transparent 8%, rgba(0, 0, 0, 0.07) 9%, transparent 50%, transparent 100% ), linear-gradient( 85deg, transparent 0%, transparent 19%, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0.07) 91%, transparent 92%, transparent 100% ); } .error-container > span.zero:after { content: ""; display: block; position: absolute; border-radius: 999px; width: 70px; height: 70px; left: 43px; bottom: 43px; background: #fdfaf5; box-shadow: -2px 2px 2px 0px rgba(0, 0, 0, 0.1); } .screen-reader-text { position: absolute; top: -9999em; left: -9999em; } @keyframes bgshadow { 0% { box-shadow: inset -160px 160px 0px 5px rgba(0, 0, 0, 0.4); } 45% { box-shadow: inset 0px 0px 0px 0px rgba(0, 0, 0, 0.1); } 55% { box-shadow: inset 0px 0px 0px 0px rgba(0, 0, 0, 0.1); } 100% { box-shadow: inset 160px -160px 0px 5px rgba(0, 0, 0, 0.4); } } /* demo stuff */ * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } body { background-color: #fdfaf5; margin-bottom: 50px; } html, button, input, select, textarea { font-family: "Montserrat", Helvetica, sans-serif; color: #bbb; } h1 { text-align: center; margin: 30px 15px; } .zoom-area { max-width: 490px; margin: 30px auto 30px; font-size: 19px; text-align: center; } .link-container { text-align: center; } a.more-link { text-transform: uppercase; font-size: 13px; background-color: #de7e85; padding: 10px 15px; border-radius: 0; color: #fff; display: inline-block; margin-right: 5px; margin-bottom: 5px; line-height: 1.5; text-decoration: none; margin-top: 50px; letter-spacing: 1px; } </style> </head> <body> <h1>404 Error Page</h1> <p class="zoom-area"><b>CSS</b> animations to make a cool 404 page. </p> <section class="error-container"> <span class="four"><span class="screen-reader-text">4</span></span> <span class="zero"><span class="screen-reader-text">0</span></span> <span class="four"><span class="screen-reader-text">4</span></span></section> </body> </html>
推荐的文章
Ads by Google
随手记
- ● PHP支持的版本及各版本最终支持时间
- ● 百度Ueditor解决上传图片及附件跨目录及返回路径的方法
- ● 记录有人物联网USR-W610串口服务器及WEB控制接线图
- ● 如何本地制作CRT证书及Apache开启SSL实现局域网的https访问
- ● Ajax返回值中无故多出回车、换行、空格字符的解决方法
- ● 百度Ueditor纯文本粘贴filterTxtRules规则的使用方法
- ● 百度Ueditor纯文本粘贴规则及上传附件链接从新窗口打开等问题(用JQ解决)
- ● 远程桌面连接报错:出现身份验证错误/要求的函数不受支持的解决方案
- ● PHP程序员在做网站开发前对基本目录结构如何规划?
- ● 简述原创内容的文章对网站质量的重要性
PHP经验分享
- ● PHP接收$_POST表单值为字符串或数组时,对安全转义的处理函数
- ● PHP+MYSQL多个字段插入或修改数据库时的简便方法
- ● 关联数组循环输出及根据键名输出键值有用法
- ● PHP生成和识别二维码的方法详解及示例源代码【百度云下载】
- ● MySQL并发相关的参数的调整
- ● PHP调用百度AI图像识别文字并输出文本结果
- ● PHP5,6,7版本中如何使用magic_quotes_gpc转义数据保证安全
- ● JQ+PHP实现浏览器webcam摄像头在线定时自动拍照存储照片
- ● 利用facedetection插件,实现JQuery+PHP的图像人脸识别功能
- ● PHP代码直接执行mysql数据库文件(.sql)的导入方法
本站PHP博客源代码下载
联系博主