当前位置: 首页 > article >正文

css3 svg制作404页面动画效果HTML源码

源码介绍

css3 svg制作404页面动画效果HTML源码,源码由HTML+CSS+JS组成,记事本打开源码文件可以进行内容文字之类的修改,双击html文件可以本地运行效果

效果预览

在这里插入图片描述

源码如下

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>svg 404页面</title>

<style>
body, html{
  margin: 0 auto;
  padding: 0;
  font-weight: 800;
}

body{
  background: #000;
  font-family: cursive;
}

svg {
    display: block;
    font: 10.5em 'Monoton';
    width: 960px;
    height: 300px;
    margin: 0 auto;
}

.content{
  text-align: center;
}

h1{
  text-align: center;
  font: 2em 'Roboto', sans-serif;
  font-weight: 900;
  color: #2f8f7f;
  opacity: .6;
}

a{
   display: inline-block;
   text-transform: uppercase;
   font: 1em 'Roboto';
   font-weight: 300;
   border: 1px solid #2f8f7f;
   border-radius: 4px;
   color: #2f8f7f;
   margin-top: 10%;
   padding: 8px 14px;
   text-decoration: none;
   opacity: .6;
}

.text {
    fill: none;
    stroke: white;
    stroke-dasharray: 8% 29%;
    stroke-width: 5px;
    stroke-dashoffset: 1%;
    animation: stroke-offset 5.5s infinite linear;
}

.text:nth-child(1){
	stroke: #1c234d;
	animation-delay: -1;
}

.text:nth-child(2){
	stroke: #315b2c;
	animation-delay: -2s;
}

.text:nth-child(3){
	stroke: #2f8f7f;
	animation-delay: -3s;
}

.text:nth-child(4){
	stroke: #2f8f7f;
	animation-delay: -4s;
}

.text:nth-child(5){
	stroke: #da2717;
	animation-delay: -5s;
}

@keyframes stroke-offset{
	100% {
    stroke-dashoffset: -35%;
  }
}
</style>
</head>
<body>

<link href="https://fonts.googleapis.com/css?family=Monoton" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">

<svg viewBox="0 0 960 300">
	<symbol id="s-text">
		<text text-anchor="middle" x="50%" y="80%">404</text>
	</symbol>

	<g class = "g-ants">
		<use xlink:href="#s-text" class="text"></use>
		<use xlink:href="#s-text" class="text"></use>
		<use xlink:href="#s-text" class="text"></use>
		<use xlink:href="#s-text" class="text"></use>
		<use xlink:href="#s-text" class="text"></use>
	</g>
</svg>
<div class="content">
    <h1>页面未找到</h1>
    <a href="&#x0068;&#x0074;&#x0074;&#x0070;&#x0073;&#x003a;&#x002f;&#x002f;&#x0077;&#x0077;&#x0077;&#x002e;&#x0071;&#x0071;&#x006d;&#x0075;&#x002e;&#x0063;&#x006f;&#x006d;">返回首页</a>
</div>

</body>
</html>


http://www.kler.cn/a/519973.html

相关文章:

  • 【JVM】调优
  • Python 常用运维模块之Shutil 模块
  • 绝缘栅双极性晶体管(IGBT)
  • CF 339A.Helpful Maths(Java实现)
  • 证券量化交易选择合适的编程语言
  • LetsWave脑电数据简单ERP分析matlab(一)
  • Keras、TensorFlow、PyTorch框架对比及服务器配置揭秘
  • PID如何调试,如何配置P,I,D值,如何适配pwm的定时器配置,如何给小车配电源
  • Meta-CoT:通过元链式思考增强大型语言模型的推理能力
  • 铁路通信电源设备的安全维护
  • 机位:解锁摄影视角的多维度密码
  • 20250124 Flink 增量聚合 vs 全量聚合
  • 自定义命令执行器:C++中命令封装的深度探索(C/C++实现)
  • WebForms 表单
  • Linux系统中处理子进程的终止问题
  • LabVIEW橡胶动态特性测试系统
  • Python数据分析-Python语法基础,IPython和Jupyter-Notebooks(二)
  • MySQL回表详解:原理、优化与实践
  • 双指针专题算法:替换数字、链表相交、环形链表ii
  • 基于微信小程序的校园二手交易市场的设计与实现(LW+源码+讲解)