Files
front-end-example/02-css-layout/10-fixed-and-sticky/starter.html
2026-03-12 22:56:33 +08:00

51 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fixed 与 Sticky</title>
<style>
body{
background-color: rgb(248, 252, 255);
display: flex;
justify-content: center;
}
a{
text-decoration: none;
color: white;
background-color: rgb(5, 94, 5);
border-radius: 20px;
padding: 10px 20px;
position: fixed;
right: 20px;
bottom: 20px;
font-size: 18px;
}
.page{
wi
}
</style>
</head>
<body>
<a class="help" href="#">帮助</a>
<section class="page">
<header class="topbar">学习导航</header>
<div class="content">
<p>向下滚动时观察导航位置。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
<p>这里放一些占位内容。</p>
</div>
</section>
</body>
</html>