前端404html静态页面可直接使用

该篇文章展示了如何使用HTML和CSS创建一个404页面,包括错误提示信息和统一的视觉设计。
摘要由CSDN通过智能技术生成

在这里插入图片描述

HTML代码

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 - 页面未找到</title>
<style type="text/css">
/* 统一设置字体 */
body {
    font-family: 'Courgette', cursive;
    background: linear-gradient(#e5f9f7, #d1f5f1, #f7fdfc); /* 使用线性渐变背景色 */
    margin: 0;
    padding: 0;
}

/* 居中显示内容 */
.container {
    width: 100%;
    height: 100vh; /* 视窗高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.container .in {
    background: #fff;
    padding: 0 10%;
	border: 4px solid #c0ece7;
    border-color: rgba(192, 237, 232, 07);
}

/* 优化Logo样式 */
.container .in h2 {
	line-height: 50px;
    font-size: 30px;
	font-family:MicrosoftYaHei;
    color: #e94c3c;
    border-bottom: 1px dashed #aacdd5;
    padding: 18px 0;
}

.container .in p {
    padding: 30px 0 50px 0;
    text-align: center;
    color: #e94c3c;
}
</style>
</head>
<body>
<div class="container">
	<div class="in">
			<div class="textThis">
				<h2>出错啦404</h2>
				<p>SORRY,页面没有找到</p>
			</div>
		</div>
</div>
</body>
</html>
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值