用HTML+CSS+JS搭建一个超简单的静态实用网站页面
warning:
这篇文章距离上次修改已过184天,其中的内容可能已经有所变动。
以下是一个简单的静态网站页面示例,包括HTML结构、CSS样式和JavaScript功能。这个页面具有导航栏、主内容区域和页脚。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Static Website</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
min-height: 100vh;
flex-direction: column;
}
header, footer {
background-color: #f2f2f2;
padding: 20px 0;
text-align: center;
}
nav {
background-color: #333;
color: white;
text-align: center;
padding: 20px;
}
nav a {
color: white;
text-decoration: none;
padding: 0 10px;
}
main {
flex: 1;
padding: 20px;
}
</style>
</head>
<body>
<header>
<h1>Simple Website</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Contact</a>
</nav>
<main>
<h2>Main Content Goes Here</h2>
<p>This is where the main content of the page goes.</p>
</main>
<footer>
<p>Copyright © 2023 Simple Website</p>
</footer>
<script>
// JavaScript code goes here
</script>
</body>
</html>
这个示例提供了一个简单的网站页面骨架,可以根据实际需求添加更多的内容和样式。
评论已关闭