- 简洁现代版:一个单页模板,结构清晰,适合学校官网或招生页面。
- 完整多页版:一个包含多个子页面的模板框架,功能更丰富,适合中小型学校网站。
简洁现代版 (单页模板)
这个模板设计简洁、现代,使用响应式设计,在手机和电脑上都能良好显示,它包含了学校网站最核心的几个部分。

(图片来源网络,侵删)
模板特点:
- 响应式布局:适配各种屏幕尺寸。
- 现代配色:使用蓝色和白色为主色调,专业且富有活力。
- 清晰的区块划分:导航、轮播图、新闻、关于我们、联系方式一目了然。
- 可编辑性强:代码结构清晰,易于修改。
如何使用:
- 将下面的代码复制到一个文本编辑器中(如 VS Code, Sublime Text, 或记事本)。
- 将文件另存为
index.html。 - 用浏览器打开这个
index.html文件,即可看到效果。 - 根据您的需求,修改其中的文字、图片链接和颜色。
index.html 代码
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">阳光中学 - 培育未来的栋梁</title>
<style>
/* --- 全局样式 --- */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Microsoft YaHei', sans-serif;
}
body {
line-height: 1.6;
color: #333;
}
.container {
width: 90%;
max-width: 1200px;
margin: 0 auto;
}
a {
text-decoration: none;
color: #fff;
}
h1, h2, h3 {
margin-bottom: 15px;
color: #0056b3;
}
/* --- 导航栏 --- */
.navbar {
background-color: #0056b3;
padding: 15px 0;
position: sticky;
top: 0;
z-index: 1000;
}
.navbar .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 24px;
font-weight: bold;
color: #fff;
}
.nav-links {
display: flex;
list-style: none;
}
.nav-links li {
margin-left: 20px;
}
.nav-links a {
color: #fff;
transition: color 0.3s;
}
.nav-links a:hover {
color: #ffd700;
}
/* --- 轮播图/横幅 --- */
.hero {
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?q=80&w=2070&auto=format&fit=crop');
background-size: cover;
background-position: center;
height: 400px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: #fff;
}
.hero h1 {
font-size: 48px;
margin-bottom: 20px;
}
.hero p {
font-size: 20px;
}
/* --- 内容区块 --- */
.section {
padding: 60px 0;
}
.section-title {
text-align: center;
margin-bottom: 40px;
}
.section-title h2 {
font-size: 32px;
}
/* --- 新闻动态 --- */
.news-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
}
.news-card {
background-color: #f9f9f9;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
transition: transform 0.3s;
}
.news-card:hover {
transform: translateY(-5px);
}
.news-card img {
width: 100%;
height: 200px;
object-fit: cover;
}
.news-card-content {
padding: 20px;
}
.news-card-content h3 {
font-size: 20px;
margin-bottom: 10px;
}
.news-card-content p {
color: #666;
margin-bottom: 15px;
}
.news-card-content a {
color: #0056b3;
font-weight: bold;
}
/* --- 关于我们 --- */
.about-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
align-items: center;
}
.about-text p {
margin-bottom: 15px;
color: #555;
}
.about-img img {
width: 100%;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
/* --- 页脚 --- */
.footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 30px 0;
}
.footer p {
margin-bottom: 10px;
}
.footer a {
color: #ffd700;
}
/* --- 响应式设计 --- */
@media (max-width: 768px) {
.navbar .container {
flex-direction: column;
}
.nav-links {
margin-top: 15px;
}
.hero h1 {
font-size: 32px;
}
.about-content {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar">
<div class="container">
<div class="logo">阳光中学</div>
<ul class="nav-links">
<li><a href="#home">首页</a></li>
<li><a href="#about">关于我们</a></li>
<li><a href="#news">新闻动态</a></li>
<li><a href="#admissions">招生信息</a></li>
<li><a href="#contact">联系我们</a></li>
</ul>
</div>
</nav>
<!-- 轮播图/横幅 -->
<header class="hero" id="home">
<div>
<h1>欢迎来到阳光中学</h1>
<p>我们点燃智慧,启迪未来</p>
</div>
</header>
<!-- 新闻动态 -->
<section class="section" id="news">
<div class="container">
<div class="section-title">
<h2>新闻动态</h2>
</div>
<div class="news-grid">
<div class="news-card">
<img src="https://images.unsplash.com/photo-1523240795612-9a054b0db644?q=80&w=2070&auto=format&fit=crop" alt="新闻图片">
<div class="news-card-content">
<h3>我校在全国青少年科技创新大赛中荣获佳绩</h3>
<p>在刚刚结束的第38届全国青少年科技创新大赛中,我校学子凭借出色的创新能力和扎实的科学素养...</p>
<a href="#">阅读更多</a>
</div>
</div>
<div class="news-card">
<img src="https://images.unsplash.com/photo-1523240795612-9a054b0db644?q=80&w=2070&auto=format&fit=crop" alt="新闻图片">
<div class="news-card-content">
<h3>2025年秋季新生入学通知</h3>
<p>尊敬的各位家长及同学:2025年秋季学期新生报到工作即将开始,请各位家长和同学仔细阅读以下通知...</p>
<a href="#">阅读更多</a>
</div>
</div>
<div class="news-card">
<img src="https://images.unsplash.com/photo-1523240795612-9a054b0db644?q=80&w=2070&auto=format&fit=crop" alt="新闻图片">
<div class="news-card-content">
<h3>我校成功举办2025年校园文化艺术节</h3>
<p>为期一周的校园文化艺术节于上周圆满落下帷幕,本次艺术节内容丰富,形式多样,充分展现了我校学子的多才多艺...</p>
<a href="#">阅读更多</a>
</div>
</div>
</div>
</div>
</section>
<!-- 关于我们 -->
<section class="section" id="about" style="background-color: #f4f4f4;">
<div class="container">
<div class="section-title">
<h2>关于我们</h2>
</div>
<div class="about-content">
<div class="about-text">
<h3>我们的使命</h3>
<p>阳光中学致力于为学生提供卓越的教育,培养他们成为具有全球视野、创新精神和责任感的未来领袖,我们相信,每个孩子都有独特的潜能,我们的使命就是帮助他们发现并实现这些潜能。</p>
<p>自建校以来,我们始终坚持“以学生为本”的教育理念,拥有一支经验丰富、充满爱心的教师团队,配备了先进的教学设施和优美的校园环境。</p>
</div>
<div class="about-img">
<img src="https://images.unsplash.com/photo-1541339907198-e08756dedf3f?q=80&w=2070&auto=format&fit=crop" alt="学校环境">
</div>
</div>
</div>
</section>
<!-- 页脚 -->
<footer class="footer" id="contact">
<div class="container">
<p>© 2025 阳光中学 版权所有</p>
<p>地址:中国北京市海淀区阳光路123号 | 电话:010-12345678 | 邮箱:info@sunshine-school.edu.cn</p>
</div>
</footer>
</body>
</html>
完整多页版 (模板框架)
这个版本更接近一个完整的网站,它包含了多个HTML页面,通过导航链接跳转,您可以根据需要创建更多页面。
模板结构:
school-website/
├── index.html (首页)
├── about.html (关于我们)
├── news.html (新闻动态)
├── admissions.html (招生信息)
├── contact.html (联系我们)
└── assets/
├── css/
│ └── style.css (所有页面共享的样式)
└── js/
└── main.js (未来可以添加JavaScript交互)
如何使用:
- 创建上述文件夹结构。
- 将下面提供的
style.css代码保存到assets/css/style.css文件中。 - 将下面提供的
index.html代码保存到根目录。 - 以此类推,创建其他HTML页面,它们都引用同一个
style.css文件,以保持样式统一。 - 修改每个页面中的
<title>和<h1>标签,以及页面的主要内容。
assets/css/style.css (共享样式文件)
/* --- 全局样式 --- */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Microsoft YaHei', sans-serif;
}
body {
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
}
.container {
width: 90%;
max-width: 1200px;
margin: 0 auto;
padding: 20px 0;
}
a {
text-decoration: none;
color: #0056b3;
}
h1, h2, h3 {
margin-bottom: 15px;
color: #0056b3;
}
p {
margin-bottom: 15px;
}
/* --- 导航栏 --- */
.navbar {
background-color: #0056b3;
padding: 15px 0;
position: sticky;
top: 0;
z-index: 1000;
}
.navbar .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 24px;
font-weight: bold;
color: #fff;
}
.nav-links {
display: flex;
list-style: none;
}
.nav-links li {
margin-left: 20px;
}
.nav-links a {
color: #fff;
transition: color 0.3s;
font-weight: 500;
}
.nav-links a:hover, .nav-links a.active {
color: #ffd700;
}
/* --- 页头/页脚 --- */
.page-header {
background-color: #fff;
padding: 40px 0;
text-align: center;
margin-bottom: 30px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.page-header h1 {
font-size: 36px;
}
.footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 30px 0;
margin-top: 50px;
}
.footer p {
margin-bottom: 10px;
}
.footer a {
color: #ffd700;
}
/* --- 主要内容区 --- */
.main-content {
background-color: #fff;
padding: 40px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin-bottom: 30px;
}
/* --- 表单样式 --- */
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
}
.btn {
display: inline-block;
background-color: #0056b3;
color: #fff;
padding: 12px 25px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s;
}
.btn:hover {
background-color: #004494;
}
/* --- 响应式设计 --- */
@media (max-width: 768px) {
.navbar .container {
flex-direction: column;
}
.nav-links {
margin-top: 15px;
flex-wrap: wrap;
justify-content: center;
}
.page-header h1 {
font-size: 28px;
}
.main-content {
padding: 20px;
}
}
index.html (首页示例)
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">首页 - 阳光中学</title>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar">
<div class="container">
<div class="logo">阳光中学</div>
<ul class="nav-links">
<li><a href="index.html" class="active">首页</a></li>
<li><a href="about.html">关于我们</a></li>
<li><a href="news.html">新闻动态</a></li>
<li><a href="admissions.html">招生信息</a></li>
<li><a href="contact.html">联系我们</a></li>
</ul>
</div>
</nav>
<!-- 页头 -->
<header class="page-header">
<div class="container">
<h1>欢迎来到阳光中学</h1>
<p>我们点燃智慧,启迪未来</p>
</div>
</header>
<div class="container">
<!-- 主要内容 -->
<main class="main-content">
<h2>学校简介</h2>
<p>阳光中学成立于2005年,是一所集小学、初中、高中于一体的现代化全日制寄宿学校,学校坐落于风景秀丽的北京郊区,占地面积200亩,环境优美,设施一流。</p>
<p>我们秉承“厚德博学,励志笃行”的校训,致力于为学生提供最优质的教育资源,学校拥有一支师德高尚、业务精湛的教师队伍,其中特级教师5名,市级骨干教师20名,硕士及以上学历教师占比超过60%。</p>
</main>
<!-- 快速链接 -->
<div class="main-content">
<h2>快速导航</h2>
<p>如果您想了解更多信息,请访问以下页面:</p>
<ul style="list-style-type: disc; padding-left: 20px;">
<li><a href="about.html">了解我们的办学理念和历史</a></li>
<li><a href="news.html">查看最新的校园新闻和活动</a></li>
<li><a href="admissions.html">获取招生简章和报名信息</a></li>
<li><a href="contact.html">找到我们的联系方式和地址</a></li>
</ul>
</div>
</div>
<!-- 页脚 -->
<footer class="footer">
<div class="container">
<p>© 2025 阳光中学 版权所有</p>
<p>地址:中国北京市海淀区阳光路123号 | 电话:010-12345678 | 邮箱:info@sunshine-school.edu.cn</p>
</div>
</footer>
</body>
</html>
about.html (关于我们页面示例)
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">关于我们 - 阳光中学</title>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<!-- 导航栏 (与首页完全相同) -->
<nav class="navbar">
<div class="container">
<div class="logo">阳光中学</div>
<ul class="nav-links">
<li><a href="index.html">首页</a></li>
<li><a href="about.html" class="active">关于我们</a></li>
<li><a href="news.html">新闻动态</a></li>
<li><a href="admissions.html">招生信息</a></li>
<li><a href="contact.html">联系我们</a></li>
</ul>
</div>
</nav>
<!-- 页头 -->
<header class="page-header">
<div class="container">
<h1>关于我们</h1>
<p>探索阳光中学的历史、使命与愿景</p>
</div>
</header>
<div class="container">
<!-- 主要内容 -->
<main class="main-content">
<h2>我们的使命与愿景</h2>
<p><strong>使命:</strong>阳光中学致力于为学生提供卓越的教育,培养他们成为具有全球视野、创新精神和责任感的未来领袖。</p>
<p><strong>愿景:</strong>成为一所让学生热爱、家长信赖、社会赞誉的顶尖学府。</p>
<h2 style="margin-top: 30px;">我们的价值观</h2>
<ul style="list-style-type: disc; padding-left: 20px;">
<li><strong>诚信:</strong>我们言行一致,信守承诺。</li>
<li><strong>尊重:</strong>我们尊重每一个人,珍视多样性。</li>
<li><strong>卓越:</strong>我们追求在所有领域做到最好。</li>
<li><strong>合作:</strong>我们相信团队协作的力量。</li>
</ul>
</main>
</div>
<!-- 页脚 (与首页完全相同) -->
<footer class="footer">
<div class="container">
<p>© 2025 阳光中学 版权所有</p>
<p>地址:中国北京市海淀区阳光路123号 | 电话:010-12345678 | 邮箱:info@sunshine-school.edu.cn</p>
</div>
</footer>
</body>
</html>
您可以用同样的方式创建 news.html, admissions.html, contact.html 等页面,只需修改 <title>、<h1> 和主要内容部分即可。
提示与建议
- 图片:代码中使用了
unsplash.com上的示例图片,为了提升网站的专业性,请务必替换为您自己的学校照片、学生活动照片等。 - 将模板中的示例文字(如“阳光中学”、“欢迎来到...”)替换为您学校的真实信息。
- 扩展功能:如果需要更复杂的功能(如在线报名、图片轮播、视频播放等),可以考虑引入前端框架(如 Bootstrap, Tailwind CSS)或编写一些 JavaScript 代码。
- 部署:完成设计后,您可以将这些文件上传到任何网站托管服务(如 GitHub Pages, Netlify, Vercel 等)来让您的网站在线。
希望这些模板能帮助您快速搭建起学校的网站!

(图片来源网络,侵删)
