家乡旅游景点网页作业制作 网页代码运用了DIV盒子的使用方法,如盒子的嵌套、浮动、margin、border、background等属性的使用,外部大盒子设定居中,内部左中右布局,下方横向浮动排列,大学学习的前端知识点和布局方式都有运用,CSS的代码量也很足、很细致,使用hover来完成过渡效果、鼠标滑过效果等,使用表格、表单补充模块,为方便新手学习页面中没有使用js有需要的可以自行添加。


⚽精彩专栏推荐👇🏻👇🏻👇🏻

【作者主页——🔥获取更多优质源码】
【web前端期末大作业——🔥🔥毕设项目精品实战案例(1000套)】


文章目录🌰

  • 一、网页介绍📖
  • 一、网页效果🌌
  • 二、代码展示😈
    • 1.HTML结构代码 🧱
    • 2.CSS样式代码 🏠
    • 3.js逻辑代码 🏠
  • 三、个人总结😊
  • 四、更多干货🚀

一、网页介绍📖

1 网页简介:此作品为学生个人主页网页设计题材,HTML+CSS 布局制作,web前端期末大作业,大学生网页设计作业源码,这是一个不错的网页制作,画面精明,代码为简单学生水平, 非常适合初学者学习使用。

2.网页编辑:网页作品代码简单,可使用任意HTML编辑软件(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++ 等任意html编辑软件进行运行及修改编辑等操作)。

3.知识应用:技术方面主要应用了网页知识中的: Div+CSS、鼠标滑过特效、Table、导航栏效果、Banner、表单、二级三级页面等,视频、 音频元素 、Flash,同时设计了Logo(源文件)所需的知识点。


一、网页效果🌌










二、代码展示😈


1.HTML结构代码 🧱

代码如下(示例):以下仅展示部分代码供参考~


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>苏州园林</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/gd.js"></script>
</head>

<body>
  <div class="wrap">
    <div class="container">
      <div class="top">
        <div class="logo"><img src="images/logo.png" width="200" height="98"></div>
        <div class="search_box">
          <input class="sou" type="text" value="搜索" />
          <input class="s-btn" type="button" value="" />
        </div>
        <div class="die">
        <img src="images/hdA.gif" width="281" height="230"> 
        </div>
      </div>
      <div class="nav">
        <ul>
          <li><a href="index.html">首页</a></li>
          <li><a href="jianjie.html">园林简介</a></li>
          <li><a href="jingqu.html">园林景区</a></li>
          <li><a href="zixun.html">园林资讯</a></li>
          <li><a href="rongyu.html">所获荣誉</a></li>
        </ul>
      </div>
      <div class="banner">
         
         <!-- 代码 开始 -->
  <div id="playBox">
    <div class="pre"></div>
    <div class="next"></div>
    <div class="smalltitle">
      <ul>
        <li class="thistitle"></li>
        <li></li>
        <li></li>
        <li></li>
      </ul>
    </div>
    <ul class="oUlplay">
       <li><a href="#" ><img src="images/1.jpg" /></a></li>
       <li><a href="#" ><img src="images/2.jpg" /></a></li>
       <li><a href="#" ><img src="images/3.jpg" /></a></li>
       <li><a href="#" ><img src="images/4.jpg" /></a></li>
       
    </ul>
  </div>
<!-- 代码 结束 -->
      </div>
      
      <div class="box">
        <div class="news-box1">
          <div class="bt">
            <h1 >园林介绍</h1></div>
          <div class="txt-box z15">
            <p>苏州古典园林,简称"苏州园林",是世界文化遗产。苏州古典园林的历史可上溯至公元前6世纪春秋时期吴王的园囿,私家园林最早见于记载的是东晋(4世纪)的辟疆园,历代造园兴盛,名园日多。明清时期,苏州成为中国最繁华的地区,私家园林遍布古城内外。16--18世纪全盛时期,苏州有园林200余处。苏州古典园林现保存完整有60多处。其中,拙政园、留园、狮子林等古典园林已列入世界文化遗产名录。</p>
            <div><audio src="music/zuisuzhou.mp3" loop controls autoplay="autoplay" ></audio></div>
          </div>
        </div>
        <div class="news-box2">
          <div class="bt">
            <h1 >园林</h1></div>
          <div class="txt-box">
            <ul class="gallery">
              <li><a href="#"><img src="images/1-01.jpg" width="179" height="124"></a></li>
              <li class="ml"><a href="#"><img src="images/1-02.jpg" width="174" height="124"></a></li>
              <li class="mt"><a href="#"><img src="images/1-03.png" width="179" height="131"></a></li>
              <li class="ml mt"><a href="#"><img src="images/1-04.jpg" width="174" height="131"></a></li>
            </ul>
          </div>
        </div>
        <div class="news-box3">
          <div class="bt">
            <h1 >园林资讯</h1></div>
          <div class="tu">
            <div class="tu-l">
            <img src="images/1-05.jpg" width="100" height="76"> 
            </div>
            <p class="z1">狮子林双11门票半价</p>
              <P><a class="more" href="#">查看详情</a></P>
          </div>
          <ul class="news-list">
            <li><a href="#">2019年园林年卡办理公告</a></li>
            <li><a href="#">拙政园、狮子林须提前网上预约...</a></li>
            <li><a href="#">团队实名制预约购票流程</a></li>
          </ul>
        </div>
        
      </div>
      
 <div class="box2">
 <div class="bt2">
            <h1>建筑特色</h1></div>
<div class="bx">
<img src="images/img2.jpg">
<h1>移步换景</h1>
<p>据地方志记载,苏州城内大小园林,在布局,结构,风格上都有自己的艺术特色,产生于苏州古典园林的鼎盛时期的拙政园、留园、网师园、环秀山庄这四座古典园林,充分体现了中国造园艺术的民族特色和水平。这四座园林占地面积不广,但巧妙地运用了种种造园艺术技巧和手法,将亭台楼阁、泉石花木组合在一起,模拟自然风光,创造了"城市山林"、"居闹市而近自然"的理想空间。</p>
</div>
<div class="bx">
<img src="images/img3.jpg">
<h1>艺术思想</h1>
<p>中国的造园艺术与中国的文学和绘画艺术具有深远的历史渊源,特别受到唐宋文人写意山水画的影响,是文人写意山水模拟的典范。中国园林在其发展过程中,形成了包括皇家园林和私家园林在内的两大系列,由于政治、经济、文化地位和自然、地理条件的差异,两者在规模、布局、体量、风格、色彩等方面有明显差别,苏州古典园林则以小巧、自由、精致、淡雅、写意见长。</p>
</div>
<div class="bx">
<img src="images/img4.jpg">
<h1>文化意味</h1>
<p>苏州的造园家运用独特的造园手法,在有限的空间里,通过叠山理水,栽植花木,配置园林建筑,并用大量的匾额、楹联、书画、雕刻、碑石、家具陈设和各式摆件等来反映古代哲理观念、文化意识和审美情趣,从而形成充满诗情画意的文人写意山水园林,使人"不出城廓而获山水之怡,身居闹市而得林泉之趣",达到"虽由人作,宛若天开"的艺术境地。</p>
</div>

</div>     
        <div class="footer"> 
    <ul class="ft-list">
      <li><h2>关于</h2></li>
      <li><a href="pages/pg1.html">▪ 园林简介</a></li>
      <li><a href="#">▪ 公司信息</a></li>
      <li></li>
    </ul>
    <ul class="ft-list">
      <li><h2>提供帮助</h2></li>
      <li><a href="#">▪ 门票咨询</a></li>
      <li><a href="#">▪ 官方服务热线</a></li>
      <li><a href="#">▪ 400-820-7000 (9:00-24:00)</a></li>
      <li><a href="#">▪ 积分及权益咨询热线</a></li>
      <li><a href="#">▪ 400-820-8976 (9:00-18:00)</a></li>
    </ul>
    <ul class="ft-list">
      <li><h2>客户服务</h2></li>
      <li><a href="#">▪ 查看我的订单</a></li>
      <li><a href="#">▪ 常见问题</a></li>
      <li><a href="#">▪ 网上预约</a></li>
      <li><a href="#">▪ 更多</a></li>
    </ul>
    <ul class="ft-list">
     <li><h2>找到我们</h2></li>
     <li><img src="images/ma.jpg" width="119" height="105" /></li>
    </ul>
     
     
     <div class="ft-nav">&nbsp;<a href="#">拙政园</a> | <a href="#">狮子林</a> | <a href="#">虎丘</a> | <a href="#">留园</a> | <a href="#">枫桥</a> | <a href="#">天平山</a> | <a href="#">帮助</a> | <a href="#">网站地图</a>
    </div>
    <div class="ft-bq">苏州园林版权所有</div>
	</div>
      <div class="clear"></div>
    </div>
  </div>
</body>
</html>



2.CSS样式代码 🏠

@charset "utf-8";
/* CSS Document */

body {
	margin: 0;
	padding: 0;
	font-family: "新宋体";
}

h1 {
	margin: 0;
	padding: 0;
}


	bottom: 20px;
	z-index: 9;
}

.sou {
	width: 190px;
	height: 33px;
	background: none;
	color: #999;
	font-size: 16px;
	text-indent: 30px;
	border: none;
	float: left;
}

.s-btn {
	width: 26px;
	height: 25px;
	float: left;
	border: none;
	background: url(../images/s_btn.png) no-repeat;
	margin-top: 5px;
	margin-left: 7px;
	cursor: pointer;
}

.banner {
	width: 100%;
	height: 450px;
	margin-bottom: 36px;
}

.clear {
	clear: both;
}

#divSmallBox {
	overflow: hidden;
	*display: inline;
	*zoom: 1;
	width: 10px;
	height: 10px;
	margin: 0 5px;
	border-radius: 10px;
	background: #ffffff;
}

#playBox {
	width: 1100px;
	height: 450px;
	margin: auto;
	background: #333;
	position: relative;
	overflow: hidden;
}

#playBox .oUlplay {
	width: 99999px;
	position: absolute;
	left: 0;
	top: 0;
}

#playBox .oUlplay li {
	float: left;
}

#playBox .pre {
	cursor: pointer;
	width: 45px;
	height: 45px;
	background: url(../images/l.png) no-repeat;
	position: absolute;
	top: 190px;
	left: 10px;
	z-index: 10;
}

#playBox .next {
	cursor: pointer;
	width: 45px;
	height: 45px;
	background: url(../images/r.png) no-repeat;
	position: absolute;
	top: 190px;
	right: 10px;
	z-index: 10;
}

#playBox .smalltitle {
	width: 1100px;
	height: 10px;
	position: absolute;
	bottom: 15px;
	z-index: 10
}

#playBox .smalltitle ul {
	width: 120px;
	margin: 0 auto;
}

#playBox .smalltitle ul li {
	width: 10px;
	height: 10px;
	margin: 0 5px;
	border-radius: 10px;
	background: #ffffff;
	float: left;
	overflow: hidden;
	*display: inline;
	*zoom: 1;
}

#playBox .smalltitle .thistitle {
	background: #900;
}

.box {
	width: 100%;
	height: 400px;
	margin-top: 10px;
}

.news-box1 {
	width: 297px;
	height: 400px;
	margin-left: 10px;
	float: left;
}

.bt {
	width: 100%;
	height: 46px;
	float: left;
	color: #804040;
	font-size: 16px;
	border-bottom: #804040 1px solid;
	margin-bottom: 10px;
}

.bt2 {
	width: 1065px;
	height: 46px;
	float: left;
	color: #804040;
	font-size: 16px;
	border-bottom: #804040 1px solid;
	margin-bottom: 20px;
	margin-left: 13px;
}

.txt-box {
	width: 100%;
	height: auto;
	float: left;
	margin-top: 20px;
}

.z15 {
	font-size: 15px;
	line-height: 26px;
}

.z15 p {
	text-indent: 2em;
}

.z15b p {
	margin-top: 15px;
	font-size: 15px;
	line-height: 26px;
	text-indent: 2em;
}

.news-box2 {
	width: 390px;
	height: auto;
	float: left;
	margin-left: 34px;
}

.gallery li {
	float: left;
	display: block;
}

.ml {
	margin-left: 32px;
}

.mt {
	margin-top: 30px;
}

.news-box3 {
	width: 327px;
	height: 157px;
	float: right;
	margin-right: 5px;
}

.tu {
	width: 100%;
	height: 80px;
	float: left;
	padding-bottom: 30px;
	margin-top: 20px;
	border-bottom: solid 1px #333;
}

.tu-l {
	float: left;
	margin-right: 6px;
}

.z1 {
	font-size: 19px;
	color: #333;
	line-height: 50px;
}

.news-list {
	width: 100%;
	float: left;
	margin-top: 50px;
}

.news-list li a {
	display: block;
	font-size: 20px;
	line-height: 38px;
	color: #333;
}

.more {
	color: #333;
}

.more:hover {
	color: #F00;
}

.box2 {
	width: 1100px;
	height: 520px;
	padding: 33px 0px;
}

.box2 .bx {
	width: 335px;
	height: 520px;
	float: left;
	margin: 0px 15px;
}

.box2 .bx img {
	width: 335px;
	height: 225px;
}

.box2 .bx h1 {
	font-size: 16px;
	color: #212120;
	height: 40px;
	line-height: 40px;
}

.box2 .bx p {
	font-size: 14px;
	line-height: 28px;
	color: #000
}

.conr {
	height: auto;
	overflow: hidden;
}

.conr img {
	width: 294px;
	height: 195px;
	margin: 10px;
	margin-bottom: 5px;
}

.conr p {
	line-height: 30px;
	text-indent: 2em
}

.shet {
	width: 100%;
	height: auto;
	min-height: 230px;
	margin-bottom: 20px;
	border-bottom: #CCC 1px dashed;
	padding-bottom: 10px;
}

.shet h1 {
	height: 45px;
	line-height: 45px;
	font-size: 18px;
}

.mr {
	float: left;
	margin-right: 20px !important;
}

.ml {
	float: right;
	margin-left: 20px !important;
}

.footer {
	width: 1100px;
	height: 250px;
	float: left;
	background: #999;
	margin-top: 50px;
	border-radius: 5px;
}

.footer p {
	color: #FFF;
	line-height: 60px;
}

.ft-list {
	float: left;
	margin-top: 22px;
	margin-left: 120px;
}

.ft-list li a {
	line-height: 20px;
	color: aliceblue;
	font-size: 12px;
	text-decoration: none;
}

.ft-list li h2 {
	color: #FFF;
	margin-bottom: 15px;
}

.ft-nav {
	width: 630px;
	height: auto;
	float: left;
	margin-top: 20px;
	line-height: 43px;
	color: #666;
}

.ft-nav a {
	color: #CCC;
	text-decoration: none;
}

.ft-bq {
	float: right;
	line-height: 43px;
	width: 412px;
	color: #666;
	font-size: 12px;
	color: #CCC;
	margin-top: 20px;
}

.con-box {
	width: 1040px;
	height: auto;
	float: left;
	padding: 30px;
}

.fl {
	float: left;
	margin-right: 5px;
}

.lj a {
	font-size: 16px;
	font-weight: bold;
	color: #333;
}

.lj a:hover {
	color: #F00;
}

.box-line {
	width: 100%;
	height: auto;
	float: left;
	padding: 20px 0px;
	border-bottom: solid 1px #666;
}

.new-tu {
	float: left;
	margin-right: 15px;
}



3.js逻辑代码 🏠


function getStyle(obj,name)
{
	if(obj.currentStyle)
	{
		return obj.currentStyle[name]
	}
	else
	{
		return getComputedStyle(obj,false)[name]
	}
}

function getByClass(oParent,nClass)
{
	var eLe = oParent.getElementsByTagName('*');
	var aRrent  = [];
	for(var i=0; i<eLe.length; i++)
	{
		if(eLe[i].className == nClass)
		{
			aRrent.push(eLe[i]);
		}
	}
	return aRrent;
}

function startMove(obj,att,add)
{
	clearInterval(obj.timer)
	obj.timer = setInterval(function(){
	   var cutt = 0 ;
	   if(att=='opacity')
	   {
		   cutt = Math.round(parseFloat(getStyle(obj,att)));
	   }
	   else
	   {
		   cutt = Math.round(parseInt(getStyle(obj,att)));
	   }
	   var speed = (add-cutt)/4;
	   speed = speed>0?Math.ceil(speed):Math.floor(speed);
	   if(cutt==add)
	   {
		   clearInterval(obj.timer)
	   }
	   else
	   {
		   if(att=='opacity')
		   {
			   obj.style.opacity = (cutt+speed)/100;
			   obj.style.filter = 'alpha(opacity:'+(cutt+speed)+')';
		   }
		   else
		   {
			   obj.style[att] = cutt+speed+'px';
		   }
	   }
	   
	},30)
}

  window.onload = function()
  {
	  var oDiv = document.getElementById('playBox');
	  var oPre = getByClass(oDiv,'pre')[0];
	  var oNext = getByClass(oDiv,'next')[0];
	  var oUlBig = getByClass(oDiv,'oUlplay')[0];
	  var aBigLi = oUlBig.getElementsByTagName('li');
	  var oDivSmall = getByClass(oDiv,'smalltitle')[0]
	  var aLiSmall = oDivSmall.getElementsByTagName('li');
	  
	  function tab()
	  {
	     for(var i=0; i<aLiSmall.length; i++)
	     {
		    aLiSmall[i].className = '';
	     }
	     aLiSmall[now].className = 'thistitle'
	     startMove(oUlBig,'left',-(now*aBigLi[0].offsetWidth))
	  }
	  var now = 0;
	  for(var i=0; i<aLiSmall.length; i++)
	  {
		  aLiSmall[i].index = i;
		  aLiSmall[i].onclick = function()
		  {
			  now = this.index;
			  tab();
		  }
	 }
	  oPre.onclick = function()
	  {
		  now--
		  if(now ==-1)
		  {
			  now = aBigLi.length;
		  }
		   tab();
	  }
	   oNext.onclick = function()
	  {
		   now++
		  if(now ==aBigLi.length)
		  {
			  now = 0;
		  }
		  tab();
	  }
	  var timer = setInterval(oNext.onclick,3000) //滚动间隔时间设置
	  oDiv.onmouseover = function()
	  {
		  clearInterval(timer)
	  }
	   oDiv.onmouseout = function()
	  {
		  timer = setInterval(oNext.onclick,3000) //滚动间隔时间设置
	  }
  }


三、个人总结😊

一套合格的网页应该包含(具体可根据个人要求而定)

  1. 页面分为页头、菜单导航栏(最好可下拉)、中间内容板块、页脚四大部分;
  2. 所有页面相互超链接,可到三级页面,有5-10个页面组成;
  3. 页面样式风格统一布局显示正常,不错乱,使用Div+Css技术;
  4. 菜单美观、醒目,二级菜单可正常弹出与跳转;
  5. 要有JS特效,如定时切换和手动切换图片新闻;
  6. 页面中有多媒体元素,如gif、视频、音乐,表单技术的使用;
  7. 页面清爽、美观、大方,不雷同。
  8. 网站前端程序不仅要能够把用户要求的内容呈现出来,还要满足布局良好、界面美观、配色优雅、表现形式多样等要求。

四、更多干货🚀

1.如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “👍点赞” “✍️评论” “💙收藏” 一键三连哦!

2.❤️【👇🏻👇🏻👇🏻关注我| 获取更多源码 | 优质文章】 带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、期末大作业模板 、等! 「在这里有好多 前端 开发者,一起探讨 前端 Node 知识,互相学习」!

3.以上内容技术相关问题😈欢迎一起交流学习👇🏻👇🏻👇🏻🔥

更多推荐

苏州园林景区网页设计 学生家乡网页设计作品静态HTML网页模板源码 DW大学生家乡主题网站制作 简单家乡介绍网页设计成品