<!DOCTYPE html>
<html>
<head>
	<title>我的网站</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<style>
		body {
			margin: 0;
			padding: 0;
		}
		.header {
			background-color: #333;
			color: #fff;
			padding: 10px;
			text-align: center;
		}
		.container {
			padding: 10px;
		}
		.footer {
			background-color: #333;
			color: #fff;
			padding: 10px;
			position: fixed;
			bottom: 0;
			left: 0;
			right: 0;
			display: flex;
			justify-content: space-around;
		}
		.footer a {
			color: #fff;
			text-decoration: none;
			padding: 10px;
			font-weight: bold;
		}
		.active {
			background-color: #fff;
			color: #333;
		}
		/* 针对手机和平板电脑的布局 */
		@media (max-width: 768px) {
			.footer {
				flex-direction: column;
			}
			.footer a {
				width: 100%;
				text-align: center;
			}
		}
	</style>
</head>
<body>
	<div class="header">
		<h1>我的网站</h1>
		<p>127.0.0.1/getzuy.json</p>
		<p>时间:12:00pm</p>
		<p>天气:晴</p>
	</div>
	<div class="container">
		<h2>欢迎来到我的网站!</h2>
		<p>这里是一个简单的介绍。</p>
		<div class="post-info">
			<p><a href="#">发帖人</a></p>
			<p><a href="#">发帖简介</a></p>
			<p><a href="#">原帖链接</a></p>
		</div>
	</div>
	<div class="footer">
		<a href="#" class="active">主页</a>
		<a href="#">推荐</a>
		<a href="#">启动</a>
		<a href="#">我的</a>
	</div>
</body>
</html>
手机和平板电脑响应式网页设计: 底部导航栏和内容展示

原文地址: https://www.cveoy.top/t/topic/oQyo 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录