家乡旅游景点网页作业制作 网页代码运用了DIV盒子的使用方法,如盒子的嵌套、浮动、margin、border、background等属性的使用,外部大盒子设定居中,内部左中右布局,下方横向浮动排列,大学学习的前端知识点和布局方式都有运用,CSS的代码量也很足、很细致,使用hover来完成过渡效果、鼠标滑过效果等,使用表格、表单补充模块,为方便新手学习页面中没有使用js有需要的可以自行添加。
文章目录🌰
- 一、网页介绍📖
- 一、网页效果🌌
- 二、代码展示😈
- 1.HTML结构代码 🧱
- 2.CSS样式代码 🏠
- 三、个人总结😊
- 四、更多干货🚀
一、网页介绍📖
1 网页简介:此作品为学生个人主页网页设计题材,HTML+CSS 布局制作,web前端期末大作业,大学生网页设计作业源码,这是一个不错的网页制作,画面精明,代码为简单学生水平, 非常适合初学者学习使用。
2.网页编辑:网页作品代码简单,可使用任意HTML编辑软件(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++ 等任意html编辑软件进行运行及修改编辑等操作)。
3.知识应用:技术方面主要应用了网页知识中的: Div+CSS、鼠标滑过特效、Table、导航栏效果、Banner、表单、二级三级页面等,视频、 音频元素 、Flash,同时设计了Logo(源文件)所需的知识点。
一、网页效果🌌
二、代码展示😈
1.HTML结构代码 🧱
代码如下(示例):以下仅展示部分代码供参考~
2.CSS样式代码 🏠
/* CSS Document */
body,
ul,
dl,
dt,
dd,
h1,
h2,
h3,
form,
p {
margin: 0;
padding: 0;
}
body {
font-size: 12px;
color: #666;
line-height: 200%;
background-color: #E2E2E2;
}
.border {
border: 1px solid #E0E0E0;
margin-bottom: 10px;
overflow: hidden;
zoom: 1;
}
ul {
list-style: none;
}
a {
text-decoration: none;
color: #666;
}
a:hover,
#meititle a:hover {
color: #FF0000
}
.margin30 {
margin-left: 30px;
}
#wrapper {
width: 926px;
margin: 0 auto;
padding: 0;
border-left: 1px solid #e0e0e0;
border-right: 1px solid #e0e0e0;
background-color: #FFFFFF;
overflow: hidden;
zoom: 1;
}
#header {
height: 188px;
border-bottom: 5px solid #D80000;
}
#header h1 {
float: left;
width: 167px;
height: 62px;
}
#header h1 a {
display: block;
width: 167px;
height: 62px;
background: url(../images/logo.png) no-repeat;
text-indent: -9999px;
}
#headerR {
width: 100%;
float: left;
}
#links {
text-align: right;
height: 150px;
background: url(../images/headerbg.jpg) repeat-x;
padding-top: 10px;
}
#links a {
color: #0964AB;
}
#links a:hover {
color: #FF0000;
}
#nav {
float: right;
margin-right: 175px;
}
#nav li {
float: left;
margin-right: 35px;
}
#nav a {
display: block;
width: 99px;
height: 28px;
line-height: 28px;
text-align: center;
font-size: 14px;
font-weight: bold;
color: #000;
background: url(../images/link.png) no-repeat;
}
#nav a:hover,
#nav a#current {
background-image: url(../images/ahover.png);
color: #fff;
}
.fontblue {
color: #0000FF;
}
/*header end*/
#title {
clear: both;
margin: 10px 0;
}
#title h1 {
float: left;
font-size: 18px;
background: url(../images/pageTitleIcon.gif) no-repeat;
padding-left: 30px;
width: 190px;
}
#title marquee {
float: left;
width: 700px;
}
/*title end*/
#mid {
clear: both;
}
#left {
float: left;
width: 252px;
}
#newlist {
list-style: url(../images/list.gif);
padding-left: 30px;
width: 193px;
float: left;
padding-top: 5px;
}
#butt {
width: 27px;
float: left;
}
#butt li {
width: 15px;
padding: 1px;
border: 1px solid #e0e0e0;
border-right: none;
margin-left: 9px;
}
#butt li a {
display: block;
width: 15px;
background: url(../images/tab.gif) repeat-x;
height: 25px;
line-height: 25px;
text-align: center;
}
#butt li#current {
width: 24px;
margin-left: 0;
}
#butt li#current a {
background: url(../images/redsanjiao.png) no-repeat left;
width: 24px;
}
#sort dl {
clear: both;
background: url(../images/dtbg.png) repeat-x;
color: #000;
}
#sort dt {
background: url(../images/regimg.gif) no-repeat 10px center;
height: 25px;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
line-height: 25px;
padding-left: 30px;
font-weight: bold;
}
#sort dd {
float: left;
width: 68px;
padding: 5px 5px 5px 10px;
}
#pingjia h3 {
background: url(../images/pingjia.gif) no-repeat;
height: 28px;
line-height: 28px;
padding-left: 30px;
color: #000;
font-size: 12px;
}
#pingjia dl {
clear: both;
margin: 10px;
width: 230px;
padding-bottom: 20px;
overflow: hidden;
border-bottom: 1px dashed #E3E3E3;
}
#pingjia dt {
float: left
}
#pingjia img {
border: 1px solid #e0e0e0;
margin-right: 20px;
border: 1px solid #E3E3E3;
}
#pingjia span {
color: red;
}
#pingjia dd {
color: #333;
}
#pingjia marquee {
height: 300px;
}
#right {
width: 660px;
float: right;
}
#sortt dt {
background: url(../images/regimg.gif) no-repeat 10px center;
height: 25px;
line-height: 25px;
padding-left: 30px;
font-weight: bold;
}
#sortt dd {
padding-left: 20px;
}
/*left end*/
h2 {
background-image: url(../images/bak.png);
height: 35px;
line-height: 35px;
margin-bottom: 15px;
color: #000000;
font-size: 14px;
padding-left: 20px;
width: 630px;
clear: both;
}
#pro dl {
float: left;
padding-right: 13px;
margin-bottom: 25px;
}
#pro dd {
text-align: center;
}
#pro .blue {
color: #0964AB
}
#pro .red,
#footer .red {
color: #CC0000
}
#pro dd .xie {
text-decoration: line-through;
font-style: italic;
}
/*right end*/
/*mid end*/
#footer {
clear: both;
}
.watch,
.car,
.xinxian,
.card,
.wanshan {
height: 44px;
border-top: 1px solid #E0E0E0;
padding-top: 20px;
border-bottom: 1px solid #E0E0E0;
padding-bottom: 20px;
float: left;
padding-right: 20px;
}
#footer li {
padding-left: 60px;
border-right: 1px solid #E0E0E0;
padding-right: 20px;
color: #000;
}
#footer .wanshan li {
border: none;
line-height: 44px;
}
.watch {
background: url(../images/indexborder1.jpg) no-repeat center left;
}
.car {
background: url(../images/indexborder2.jpg) no-repeat center left;
}
.xinxian {
background: url(../images/indexborder3.jpg) no-repeat center left;
}
.card {
background: url(../images/indexborder4.jpg) no-repeat center left;
}
.wanshan {
background: url(../images/indexborder5.jpg) no-repeat center left;
}
#guanyu {
clear: both;
padding-top: 20px;
}
#footer p {
text-align: center;
line-height: 200%
}
.wu {
text-decoration: underline;
color: #0964AB
}
/*footer end*/
/*-----index end--------*/
#meititle h1 {
float: left;
font-size: 12px;
font-weight: 500;
background: url(../images/meiguijia.png) no-repeat;
margin: 8px 0;
padding-left: 30px;
width: 300px;
}
#meititle a {
color: #0964AB
}
#page {
clear: both;
text-align: right;
border-top: 1px solid #E0E0E0;
line-height: 60px
}
#page .current {
border: 1px solid #CC0000;
color: #CC0000;
padding: 2px 8px;
margin: 0;
position: relative;
top: -7px;
}
#page .two {
border: 1px solid #E0E0E0;
padding: 2px 8px;
margin: 0 10px;
position: relative;
top: -7px;
}
#page a img {
border: none;
}
/*-------meigui end---------*/
#pro .gengduo {
color: #0964AB;
font-size: 12px;
font-weight: 500;
float: right;
}
/*-------xianhua------*/
三、个人总结😊
一套合格的网页应该包含(具体可根据个人要求而定)
- 页面分为页头、菜单导航栏(最好可下拉)、中间内容板块、页脚四大部分;
- 所有页面相互超链接,可到三级页面,有5-10个页面组成;
- 页面样式风格统一布局显示正常,不错乱,使用Div+Css技术;
- 菜单美观、醒目,二级菜单可正常弹出与跳转;
- 要有JS特效,如定时切换和手动切换图片新闻;
- 页面中有多媒体元素,如gif、视频、音乐,表单技术的使用;
- 页面清爽、美观、大方,不雷同。
- 网站前端程序不仅要能够把用户要求的内容呈现出来,还要满足布局良好、界面美观、配色优雅、表现形式多样等要求。