一、??作品介紹
HTML實例網(wǎng)頁代碼, 本實例適合于初學HTML的同學。該實例里面有設(shè)置了css的樣式設(shè)置来惧,有div的樣式格局,這個實例比較全面演顾,有助于同學的學習,本文將介紹如何通過從頭開始設(shè)計個人網(wǎng)站并將其轉(zhuǎn)換為代碼的過程來實踐設(shè)計供搀。
二、??作品效果
??視頻演示
https://live.csdn.net/v/embed/240075
(title-K21JP-NBA勒布朗詹姆斯籃球明星帶js(5頁)html+css+js)]
?? 截圖演示
06.png
05.png
04.png
03.png
02.png
01.png
三钠至、?? 作品代碼
??HTML代碼
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="css/all.css" rel="stylesheet" media="all" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/koala.min.1.5.js"></script>
<title>網(wǎng)站首頁</title>
</head>
<body>
<div class="banner"> </div>
<div class="menu">
<ul class="center">
<li><a href="index.html">網(wǎng)站首頁</a></li>
<li><a href="jibenxinxi.html">基本信息</a></li>
<li><a href="gerenjilu.html">個人記錄</a></li>
<li><a href="jingcaitupian.html">精彩圖片</a></li>
<li><a href="huojiangjilu.html">獲獎記錄</a></li><li><a href="liuyan.html">作者留言</a></li>
</ul>
</div>
<div class="content">
<div class="left">
<div class="pics">
<!-- 代碼 開始 -->
<!-- 代碼 開始 -->
<div id="fsD1" class="focus">
<div id="D1pic1" class="fPic">
<div class="fcon" style="display: none;"> <a target="_blank" href="#"><img src="images/shouye_15.jpg" style="opacity: 1; "></a> </div>
<div class="fcon" style="display: none;"> <a target="_blank" href="#"><img src="images/big.jpg" style="opacity: 1; "></a> </div>
<div class="fcon" style="display: none;"> <a target="_blank" href="#"><img src="images/GetLargeImg1.jpg" style="opacity: 1; "></a> </div>
</div>
<div class="fbg">
<div class="D1fBt" id="D1fBt"> <a href="javascript:void(0)" hidefocus="true" target="_self" class=""><i>1</i></a> <a href="javascript:void(0)" hidefocus="true" target="_self" class=""><i>2</i></a> <a href="javascript:void(0)" hidefocus="true" target="_self" class="current"><i>3</i></a> </div>
</div>
<span class="prev"></span> <span class="next"></span> </div>
<script type="text/javascript">
Qfast.add('widgets', { path: "js/terminator2.2.min.js", type: "js", requires: ['fx'] });
Qfast(false, 'widgets', function () {
K.tabs({
id: 'fsD1', //焦點圖包裹id
conId: "D1pic1", //** 大圖域包裹id
tabId:"D1fBt",
tabTn:"a",
conCn: '.fcon', //** 大圖域配置class
auto: 1, //自動播放 1或0
effect: 'fade', //效果配置
eType: 'click', //** 鼠標事件
pageBt:true,//是否有按鈕切換頁碼
bns: ['.prev', '.next'],//** 前后按鈕配置class
interval: 3000 //** 停頓時間
})
})
</script>
<!-- 代碼 結(jié)束 -->
</div>
</div>
<div class="right">
<h4 class="mar">基本信息</h4>
<div class="produce">
勒布朗·詹姆斯(LeBron James)葛虐,1984年12月30日出生在美國俄亥俄州阿克倫,美國職業(yè)籃球運動員棉钧,司職小前鋒屿脐,綽號“小皇帝”,效力于NBA洛杉磯湖人隊。<br />
勒布朗·詹姆斯在2003年NBA選秀中于首輪第1順位被克利夫蘭騎士隊選中的诵。2003-2010年万栅,詹姆斯效力于騎士隊,期間2次當選NBA最有價值球員(MVP)西疤。2010年烦粒,詹姆斯轉(zhuǎn)會至邁阿密熱火隊,與德懷恩·韋德代赁、克里斯·波什組成“三巨頭”陣容扰她。2012年,詹姆斯得到NBA個人生涯的第3座常規(guī)賽MVP芭碍,第1個總冠軍和總決賽MVP徒役。 </p>
</div>
</div>
<div class="bar">圖片</div>
<div class="pics scrollleft" >
<ul>
<li>
<p><img src="images/1.jpg" width="230" height="160"/></p>
</li>
<li>
<p><img src="images/2.jpg" width="230" height="160"/></p>
</li>
<li>
<p><img src="images/3.jpg" width="230" height="160"/></p>
</li>
<li>
<p><img src="images/4.jpg" width="230" height="160"/></p>
</li>
<li>
<p><img src="images/5.jpg" width="230" height="160"/></p>
</li>
<li>
<p><img src="images/6.jpg" width="230" height="160"/></p>
</li>
<li>
<p><img src="images/7.jpg" width="230" height="160"/></p>
</li>
<li>
<p><img src="images/8.jpg" width="230" height="160"/></p>
</li>
</ul>
<div class="clear"></div>
</div>
<div class="bar">留言板</div>
<div class="msg pad">
<div> <span class="fl">你的性別:</span>
<input type="radio" name="aa" />
男
<input type="radio" name="aa" />
女 </div>
<div> <span class="fl">留言主題:</span>
<input type="text" size="50" />
</div>
<div> <span class="fl">留言內(nèi)容:</span>
<textarea style="width:400px" rows="5"></textarea>
</div>
<div> <span class="fl">提交留言:</span>
<input type="submit" value="提交" />
</div>
</div>
<div class="clear"></div>
</div>
<div class="end">
<p>版權(quán)所有 網(wǎng)址:www.xxxx.com</p>
</div>
<div class="clear"></div>
</body>
</html>
??CSS代碼
@charset "utf-8";
/* CSS Document */
ul,li,h1,h2,h3,p{ padding:0; margin:0; list-style:none}
a{ text-decoration:none; color:#000}
html{ }
body{background:url(../images/timg.jpg) no-repeat center top #000; width:1000px; margin:0 auto; line-height:21px}
.clear{ clear:both}
.menu li{ list-style:none; font-weight:bold; text-decoration:underline}
.logo{ position:absolute; top:50px; width:250px; height:100px; margin-left:40px}
.banner{ position:relative; height:400px}
.menu{ width:100%; text-align:center; float:left; background:url(../images/menu.jpg)}
.menu li a{ background:#000; border:#fff solid 1px; padding:5px; color:#9F0}.menu li {float:left; padding:15px 30px ; width:100px}
.right{ float:right; width:460px; padding:20px}
.left{ min-height:250px; float:left; width:460px; padding:20px}
.content{ background:#fff; font-size:14px; display:inline-block ; width:100%}
.pics li{ float:left}
.end{ clear:both; background:#603; color:#fff; padding:30px 0; text-align:center;}
.produce img{ margin:0 20px 20px 0}
.produce {}
.pad{ padding:20px; display:block}
.pics p{ margin:2px; text-align:center}
.mar{ margin:5px 0}
.imglist{ width:840px; margin:0 auto}
.imglist li{ float:left; width:400px; margin:10px ; text-align:center}
.scrollleft{ margin:0 30px}
.news li{ padding:5px;}
.title{ text-align:center; color:#F00; padding:10px}
.fl{ float:left}
.js div{ width:100%; clear:both; margin-bottom:20px; float:left}
.js div img{ float:left; margin-right:20px}
.msg>div{ padding:10px}
.bar{ border:#000 solid 1px; margin:20px; clear:both; background:url(../images/menu.jpg); color:#9F0; text-decoration:underline; padding:5px}
.focus{ position:relative; width:470px; height:250px; background-color: #000; float: left;}
.focus img{ width: 470px; height: 250px;}
.focus .shadow .title{width: 260px; height: 65px;padding-left: 30px;padding-top: 20px;}
.focus .shadow .title a{ text-decoration:none; color:#fff; font-size:14px; font-weight:bolder; overflow:hidden; }
.focus .btn{ position:absolute; bottom:34px; left:510px; overflow:hidden; zoom:1;}
.focus .btn a{position:relative; display:inline; width:13px; height:13px; border-radius:7px; margin:0 5px;color:#B0B0B0;font:12px/15px "\5B8B\4F53"; text-decoration:none; text-align:center; outline:0; float:left; background:#D9D9D9; }
.focus .btn a:hover,.focus .btn a.current{ cursor:pointer;background:#fc114a;}
.focus .fPic{ position:absolute; left:0px; top:0px; }
.focus .D1fBt{ overflow:hidden; zoom:1; height:16px; z-index:10; }
.focus .shadow{ width:100%; position:absolute; bottom:0; left:0px; z-index:10; height:80px; line-height: 80px; background:rgba(0,0,0,0.6);
filter:progid:DXImageTransform.Microsoft.gradient( GradientType = 0,startColorstr = '#80000000',endColorstr = '#80000000')\9; display:block; text-align:left; }
.focus .shadow a{ text-decoration:none; color:#fff; font-size:20px; overflow:hidden; margin-left:10px; font-family: "\5FAE\8F6F\96C5\9ED1";}
.focus .fcon{ position:relative; width:100%; float:left; display:none; background:#000 }
.focus .fcon img{ display:block; }
.focus .fbg{bottom:25px; right:40px; position:absolute; height:21px; text-align:center; z-index: 200; }
.focus .fbg div{margin:4px auto 0;overflow:hidden;zoom:1;height:14px}
.focus .D1fBt a{position:relative; display:inline; width:12px; height:12px; border-radius:7px; margin:0 5px;color:#B0B0B0;font:12px/15px "\5B8B\4F53"; text-decoration:none; text-align:center; outline:0; float:left; background:#D9D9D9; }
.focus .D1fBt .current,.focus .D1fBt a:hover{background:#fc114a;}
.focus .D1fBt img{display:none}
.focus .D1fBt i{display:none; font-style:normal; }
.focus .prev,.focus .next{position:absolute;width:40px;height:74px;background: url(../images/focus_btn.png) no-repeat;}
.focus .prev{top: 50%;margin-top: -37px; left: 0;background-position:0 -74px; cursor:pointer; }
.focus .next{top: 50%;margin-top: -37px; right: 0; background-position:-40px -74px; cursor:pointer;}
.focus .prev:hover{ background-position:0 0; }
.focus .next:hover{ background-position:-40px 0;}
四、??更多源碼
【干貨分享】自學編程的小伙伴可以前往我的 gitee 倉庫(持續(xù)更新中...)
??【web學習指南】從web基礎(chǔ)窖壕、計算機基礎(chǔ)到前端常用框架的教程廉涕,涵蓋前端大部分必備知識(學習指南 + 技術(shù)文章 + 資源分享)