帮我写一个网站招生宣传网站html简单一点加css要能跳转到下属学院两个即可
<!DOCTYPE html>
<html>
<head>
<title>招生宣传</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
<pre><code> h1 {
color: #004d99;
text-align: center;
}
nav {
background-color: #004d99;
padding: 10px;
margin-bottom: 30px;
}
nav a {
color: #fff;
text-decoration: none;
margin-right: 20px;
}
nav a:hover {
text-decoration: underline;
}
.container {
margin: 0 auto;
width: 80%;
max-width: 1200px;
}
.col {
float: left;
width: 50%;
padding: 10px;
box-sizing: border-box;
}
.col img {
display: block;
margin: 0 auto;
max-width: 100%;
}
.clearfix {
clear: both;
}
</style>
</code></pre>
</head>
<body>
<header>
<h1>欢迎来到招生宣传网站</h1>
</header>
<pre><code><nav>
<a href="#college1">学院1</a>
<a href="#college2">学院2</a>
</nav>
<div class="container">
<div class="col">
<h2 id="college1">学院1</h2>
<p>学院1的招生宣传内容。</p>
<img src="college1.jpg" alt="学院1的照片">
</div>
<div class="col">
<h2 id="college2">学院2</h2>
<p>学院2的招生宣传内容。</p>
<img src="college2.jpg" alt="学院2的照片">
</div>
<div class="clearfix"></div>
</div>
<footer>
<p>版权所有 &copy; 2021 招生宣传网站</p>
</footer>
</code></pre>
</body>
</html
原文地址: https://www.cveoy.top/t/topic/eh89 著作权归作者所有。请勿转载和采集!