HTML实例网页代码, 本实例适合于初学HTML的同学。该实例里面有设置了css的样式设置,有div的样式格局,这个实例比较全面,有助于同学的学习,本文将介绍如何通过从头开始设计个人网站并将其转换为代码的过程来实践设计。
文章目录
- 一、网页介绍
- 一、网页效果
- 二、代码展示
- 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代码
代码如下(示例):以下仅展示部分代码供参考~
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>叮当电影 - 搜罗全网好电影</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="./css/index.css">
</head>
<body>
<header class="header">
<div class="container">
<!--logo-->
<a href="index.html" class="logo"></a>
<!--导航标签-->
<div class="nav">
<ul class="navbar">
<li><a href="index.html" class="active">首页</a></li>
<li><a href="movie.html">购票</a></li>
<li><a href="javascript:;">影院</a></li>
<li><a href="javascript:;">社区</a></li>
</ul>
</div>
<!--购物车-->
<div class="headcart">
<i class="cart-icon"></i>
<b class="card-num"></b>
<div class="card-tip"></div>
</div>
<!--用户登陆注册-->
<div class="user">
<div class="userout">
<a href="login.html" class="login cur">登录</a>
<a href="register.html" class="register cur">注册</a>
</div>
<div class="userin">
<a href="javascript:;" class="menu-item-user">
<img class="user-face" src="./imgs/userface.jpg" alt="userface">
<span class="user-name"></span>
</a>
<span class="caret"></span>
<ul class="dropdown-menu">
<li><a href="javascript:;">个人中心</a></li>
<li><a href="javascript:;">退出登录</a></li>
</ul>
</div>
</div>
<!--搜索栏-->
<div class="search">
<form class="form-search" action="" method="">
<input type="text" id="search-input" class="form-search-input" placeholder="搜电影、影院" autocomplete="off"/>
<a class="form-search-icon" href="javascript:;" onclick="searchBtnClick(this,event)"></a>
</form>
</div>
<!--APP下载-->
<div class="app-download">
<span class="phone-icon"></span>
<span class="app-text">下载APP</span>
<span class="caret"></span>
<div class="qrcode-tip">
<img class="qrcode-img" src="imgs/dingdang-qrcode.png" alt="扫描二维码下载APP"/>
<p class="qrcode-tip-title">扫码下载客户端</p>
<p class="qrcode-tip-content">手机购票 方便实惠</p>
</div>
</div>
</div>
</header>
<div class="container">
<div class="slidey">
<ul id="slidey-content" style="display: none">
<li>
<img src="imgs/slideposter/Frozen2.jpg" alt="">
<p class="title">冰雪奇缘2</p>
<p class="description">为什么艾莎一出生就带着控制冰雪的能力?这个答案一致困扰着她,也威胁着王国的安全。 她将和安娜、克斯托夫、雪宝和驯鹿斯文展开一场危险但非凡的旅程…</p>
</li>
<li>
<img src="imgs/slideposter/ifseawave.jpg" alt="">
<p class="title">若能与你共乘海浪之上</p>
<p class="description">青年消防员雏罂粟港和爱好冲浪的向水日菜子相遇并迅速展开热恋。看似命中注定的这对恋人,
却不幸遭遇生死别离。无法接受港已经离世的雏子,某天突然发现,只要唱起属于两个人的那首歌,港就会从水中出现…</p>
</li>
<li>
<img src="imgs/slideposter/skyfire.jpg" alt="">
<p class="title">天·火</p>
<p class="description">火山喷发了,这些人的命运纠结在一起。为了看见明天的太阳,他们必须与过去和解, 合力为自己也为众生在绝境中寻找一条生路。
这是一个关于爱与勇气、选择与放弃、自救与他救的中国式英雄的故事…</p>
</li>
<li>
<img src="imgs/slideposter/yewen4.jpg" alt="">
<p class="title">叶问4</p>
<p class="description">因故来到美国唐人街的叶问,意外卷入一场当地军方势力与华人武馆的纠纷,面对日益猖狂的
民族歧视与压迫,叶问挺身而出,在美国海军陆战队军营拼死一战,以正宗咏春,向世界证明了中国功夫…</p>
</li>
</ul>
<div class="slidey-main">
<a href="movie.html" class="slidey-main-link"></a>
<div class="slidey-overlay">
<p class="slidey-overlay-title"></p>
<p class="slidey-overlay-description"></p>
<span class="slidey-progress"></span>
</div>
<div class="slidey-ctrls slidey-ctrls-pre"></div>
<div class="slidey-ctrls slidey-ctrls-next"></div>
</div>
<div class="slidey-list">
<ul>
<li>
<table class="slidey-list-table">
<tr>
<td rowspan="2" class="slidey-list-img">
<div></div>
</td>
<td class="slidey-list-title"></td>
</tr>
<tr>
<td class="slidey-list-description"></td>
</tr>
</table>
</li>
<li>
<table class="slidey-list-table">
<tr>
<td rowspan="2" class="slidey-list-img">
<div></div>
</td>
<td class="slidey-list-title"></td>
</tr>
<tr>
<td class="slidey-list-description"></td>
</tr>
</table>
</li>
<li>
<table class="slidey-list-table">
<tr>
<td rowspan="2" class="slidey-list-img">
<div></div>
</td>
<td class="slidey-list-title"></td>
</tr>
<tr>
<td class="slidey-list-description"></td>
</tr>
</table>
</li>
<li>
<table class="slidey-list-table">
<tr>
<td rowspan="2" class="slidey-list-img">
<div></div>
</td>
<td class="slidey-list-title"></td>
</tr>
<tr>
<td class="slidey-list-description"></td>
</tr>
</table>
</li>
</ul>
</div>
</div>
<div class="movie-grid">
<div class="panel">
<div class="main">
<div class="panel-header">
<span class="panel-title">正在热映(<span>20</span>部)</span>
<a href="javascript:;" class="panel-more">更多</a>
</div>
<div class="movie-list">
<ul>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/bingxueqiyuan2.jpg" alt="" class="poster">
<span class="movie-score">8.0</span>
</a>
<span class="movie-title">冰雪奇缘2</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/chuixiaoren.jpg" alt="" class="poster">
<span class="movie-score">8.5</span>
</a>
<span class="movie-title">吹哨人</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/dayuezaidongji.jpg" alt="" class="poster">
<span class="movie-score">8.8</span>
</a>
<span class="movie-title">大约在冬季</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/haishanggangqinshi.jpg" alt="" class="poster">
<span class="movie-score">9.2</span>
</a>
<span class="movie-title">海上钢琴师</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/ruonengyuni.jpg" alt="" class="poster">
<span class="movie-score">8.7</span>
</a>
<span class="movie-title">若能与你共乘海浪之上</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/tianhuo.jpg" alt="" class="poster">
<span class="movie-score">8.3</span>
</a>
<span class="movie-title">天·火</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/yewen4.jpg" alt="" class="poster">
<span class="movie-score">8.8</span>
</a>
<span class="movie-title">叶问4</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
<li>
<a href="movie.html" class="movie-poster">
<img src="./imgs/poster/yishengyouni.jpg" alt="" class="poster">
<span class="movie-score">8.3</span>
</a>
<span class="movie-title">一生有你</span>
<a href="movie.html" class="movie-ticket-buy">选座购票</a>
</li>
</ul>
</div>
</div>
<div class="aside">
<div class="panel-header">
<span class="panel-title">今日票房</span>
<a href="javascript:;" class="panel-more">更多</a>
</div>
<div class="movie-rank">
<ul>
<li class="movie-rank-top1">
<a href="javascript:;">
<span class="movie-rank-num movie-rank-top3">1</span>
<img src="./imgs/poster/haishanggangqinshi.jpg" alt="">
<div>
<p class="movie-rank-name">海上钢琴师</p>
<span class="box-office">1500万</span>
</div>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num movie-rank-top3">2</span>
<p class="movie-rank-name">叶问4</p>
<span class="box-office">1400万</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num movie-rank-top3">3</span>
<p class="movie-rank-name">若能与你共乘海浪之上</p>
<span class="box-office">1000万</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">4</span>
<p class="movie-rank-name">吹哨人</p>
<span class="box-office">900万</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">5</span>
<p class="movie-rank-name">大约在冬季</p>
<span class="box-office">800万</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">6</span>
<p class="movie-rank-name">吹哨人</p>
<span class="box-office">700万</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">7</span>
<p class="movie-rank-name">天·火</p>
<span class="box-office">600万</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">8</span>
<p class="movie-rank-name">一生有你</p>
<span class="box-office">550万</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">9</span>
<p class="movie-rank-name">冰雪奇缘2</p>
<span class="box-office">450万</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="panel">
<div class="main">
<div class="panel-header">
<span class="panel-title">即将上映(<span>30</span>部)</span>
<a href="javascript:;" class="panel-more">更多</a>
</div>
<div class="movie-list">
<ul>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/bingxueqiyuan2.jpg" alt="" class="poster">
<span class="movie-score">12月25日上映</span>
</a>
<span class="movie-title">冰雪奇缘2</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/chuixiaoren.jpg" alt="" class="poster">
<span class="movie-score">12月25日上映</span>
</a>
<span class="movie-title">吹哨人</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/dayuezaidongji.jpg" alt="" class="poster">
<span class="movie-score">12月26日上映</span>
</a>
<span class="movie-title">大约在冬季</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/haishanggangqinshi.jpg" alt="" class="poster">
<span class="movie-score">12月26日上映</span>
</a>
<span class="movie-title">海上钢琴师</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/ruonengyuni.jpg" alt="" class="poster">
<span class="movie-score">12月26日上映</span>
</a>
<span class="movie-title">若能与你共乘海浪之上</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/tianhuo.jpg" alt="" class="poster">
<span class="movie-score">12月27日上映</span>
</a>
<span class="movie-title">天·火</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/yewen4.jpg" alt="" class="poster">
<span class="movie-score">12月28日上映</span>
</a>
<span class="movie-title">叶问4</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
<li>
<a href="javascript:;" class="movie-poster">
<img src="./imgs/poster/yishengyouni.jpg" alt="" class="poster">
<span class="movie-score">12月28日上映</span>
</a>
<span class="movie-title">一生有你</span>
<a href="javascript:;" class="movie-ticket-buy">预售</a>
</li>
</ul>
</div>
</div>
<div class="aside">
<div class="panel-header">
<span class="panel-title">备受期待</span>
<a href="javascript:;" class="panel-more">更多</a>
</div>
<div class="movie-rank">
<ul>
<li class="movie-rank-top1">
<a href="javascript:;">
<span class="movie-rank-num movie-rank-top3">1</span>
<img src="./imgs/poster/haishanggangqinshi.jpg" alt="">
<div>
<p class="movie-rank-name">海上钢琴师</p>
<span class="box-office">1500人想看</span>
</div>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num movie-rank-top3">2</span>
<p class="movie-rank-name">叶问4</p>
<span class="box-office">1400人想看</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num movie-rank-top3">3</span>
<p class="movie-rank-name">若能与你共乘海浪之上</p>
<span class="box-office">1000人想看</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">4</span>
<p class="movie-rank-name">吹哨人</p>
<span class="box-office">900人想看</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">5</span>
<p class="movie-rank-name">大约在冬季</p>
<span class="box-office">800人想看</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">6</span>
<p class="movie-rank-name">吹哨人</p>
<span class="box-office">700人想看</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">7</span>
<p class="movie-rank-name">天·火</p>
<span class="box-office">600人想看</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">8</span>
<p class="movie-rank-name">一生有你</p>
<span class="box-office">550人想看</span>
</a>
</li>
<li>
<a href="javascript:;">
<span class="movie-rank-num">9</span>
<p class="movie-rank-name">冰雪奇缘2</p>
<span class="box-office">450人想看</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="link-nav">
<ul>
<li><a href="javascript:;">关于叮当</a></li>
<li><a href="javascript:;">加入我们</a></li>
<li><a href="javascript:;">联系我们</a></li>
<li><a href="javascript:;">隐私政策</a></li>
<li><a href="javascript:;">问题反馈</a></li>
</ul>
<div class="copyright">Copyright © 2019 叮当电影</div>
</div>
<div class="sns">
<a href="javascript:;" class="sina-icon icon"></a>
<a href="javascript:;" class="wechat-icon icon"></a>
<a href="javascript:;" class="rss-icon icon"></a>
</div>
</div>
</footer>
<div id="toTop"></div>
</body>
</html>
2.CSS代码
@charset "UTF-8";
@import "public-style.css";
@import "header.css";
@import "footer.css";
/********************************************/
/* 幻灯片 */
.slidey {
height: 400px;
}
/* 幻灯片 - 主要 */
.slidey .slidey-main {
position: relative;
width: 900px;
height: 400px;
float: left;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
.slidey-main-link{
display: block;
height: 285px;
}
.slidey-main .slidey-overlay {
position: absolute;
bottom: 0;
width: 100%;
min-height: 50px;
padding: 20px 70px;
color: #fff;
background-color: rgba(0, 0, 0, .5);
}
.slidey-overlay .slidey-overlay-title {
display: inline-block;
padding: 5px 30px;
font-weight: 700;
font-size: 15px;
background-color: #FF8D1B;
}
.slidey-overlay .slidey-overlay-description {
padding-top: 10px;
text-align: left;
}
.slidey-overlay .slidey-progress {
display: block;
position: absolute;
top: 0;
left: 0;
height: 3px;
background-color: #FF8D1B;
overflow: hidden;
}
.slidey-main .slidey-ctrls {
position: absolute;
width: 40px;
height: 40px;
bottom: 35px;
cursor: pointer;
opacity: .4;
border: 2px solid #fff;
border-radius: 10px;
background-color: #333;
background-repeat: no-repeat;
background-size: 24px;
background-position: center;
}
.slidey-main .slidey-ctrls:hover {
opacity: 1;
background-color: #FF8D1B;
}
.slidey-main .slidey-ctrls-pre {
left: 10px;
background-image: url("../imgs/icons/pre-icon.png");
}
三、个人总结
一套合格的网页应该包含(具体可根据个人要求而定)
- 页面分为页头、菜单导航栏(最好可下拉)、中间内容板块、页脚四大部分;
- 所有页面相互超链接,可到三级页面,有5-10个页面组成;
- 页面样式风格统一布局显示正常,不错乱,使用Div+Css技术;
- 菜单美观、醒目,二级菜单可正常弹出与跳转;
- 要有JS特效,如定时切换和手动切换图片新闻;
- 页面中有多媒体元素,如gif、视频、音乐,表单技术的使用;
- 页面清爽、美观、大方,不雷同。
- 网站前端程序不仅要能够把用户要求的内容呈现出来,还要满足布局良好、界面美观、配色优雅、表现形式多样等要求。
四、精彩推荐
1.看到这里了就 【点赞收藏博文】
三连 支持下吧,你的支持是我创作的动力, 关注获取更多源码
。
2.各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、期末大作业模板 、等! 「在这里有好多 前端 开发者,一起探讨 前端 Node 知识,互相学习」!
3.以上内容技术相关问题可以相互学习交流