一看尼、??作品介紹
HTML實例網(wǎng)頁代碼, 本實例適合于初學HTML的同學。該實例里面有設置了css的樣式設置饼暑,有div的樣式格局稳析,這個實例比較全面洗做,有助于同學的學習,本文將介紹如何通過從頭開始設計個人網(wǎng)站并將其轉(zhuǎn)換為代碼的過程來實踐設計弓叛。
二彰居、??作品效果
??視頻演示
https://live.csdn.net/v/embed/239832
(title-B27JP 名偵探柯南 三級(6頁))
?? 截圖演示
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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首頁</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="web">
<div class="top">
<div class="logo"><img src="images/logo.jpg" /></div>
<div class="nav">
<ul>
<li><a href="index.html">網(wǎng)站首頁</a></li>
<li><a href="renwu.html">熱門人物</a></li>
<li><a href="tuijian.html">熱門推薦</a></li>
<li><a href="denglu.html">會員登陸</a></li>
<li><a href="zhuce.html">會員注冊</a></li>
</ul>
</div>
<div class="sous">
<form>
<input class="inut" />
<button class="btn"></button>
</form>
</div>
</div>
<div class="banner">
<img src="images/banner.jpg" />
</div>
<div class="box1">
<div class="bx">
<img src="images/img1.jpg" />
<p>熱門連載</p>
</div>
<div class="bx">
<img src="images/img2.jpg" />
<p>最新更新</p>
</div>
<div class="bx">
<img src="images/img3.jpg" />
<p>新番動漫</p>
</div>
<div class="bx">
<img src="images/img4.jpg" />
<p>經(jīng)典完結(jié)</p>
</div>
</div>
<div class="tit">熱門動漫人物</div>
<div class="box2">
<div class="bx2">
<img src="images/img5.jpg" />
哆唻A夢
</div>
<div class="bx2">
<img src="images/img6.jpg" />
漩渦鳴人
</div>
<div class="bx2">
<img src="images/img7.jpg" />
江戶川柯南
</div>
<div class="bx2">
<img src="images/img8.jpg" />
宇智波佐助
</div>
<div class="bx2">
<img src="images/img9.jpg" />
野比大雄
</div>
</div>
<div class="tit">經(jīng)典動漫</div>
<div class="box3">
<div class="bx3">
<img src="images/img10.jpg" />
<p>哆啦A夢</p>
<p>ドラえもん</p>
</div>
<div class="bx3">
<img src="images/img11.jpg" />
<p>火影忍者</p>
<p>NARUTO -ナルト-</p>
</div>
<div class="bx3">
<img src="images/img12.jpg" />
<p>名偵探柯南</p>
<p>名探偵コナン</p>
</div>
</div>
<div class="tit">最新更新</div>
<div class="box4">
<div class="bx4">
<img src="images/img13.jpg" />
</div>
<div class="bx4">
<img src="images/img14.jpg" />
</div>
<div class="bx4">
<img src="images/img15.jpg" />
</div>
</div>
<div class="foot">
<p>Copyright©經(jīng)典動漫網(wǎng)版權(quán)所有Rights Reserved.</p>
</div>
</div>
</body>
</html>
??CSS代碼
body {
margin: 0 auto;
font-size: 12px;
font-family: "微軟雅黑",arial;
line-height: 22px;
background: #e0ecfa;
}
div,p,input,li,h1,h2,h3,h4,h5 {
height: auto;
margin: 0;
padding: 0px;
vertical-align: middle;
}
li {
list-style: none;
}
a {
text-decoration: none;
color: #000;
}
img {
border: 0;
margin: 0;
padding: 0;
}
.web {
width: 1140px;
height: auto;
overflow: hidden;
margin: 0 auto;
background: #FFF;
padding: 0px 30px;
}
.top {
height: 55px;
padding-top: 15px;
}
.logo {
width: 116px;
height: 39px;
float: left;
margin-right: 50px;
}
.nav {
width: 720px;
height: 39px;
float: left;
}
.nav ul {
padding: 0px;
margin: 0;
}
.nav ul li {
height: 39px;
line-height: 39px;
float: left;
margin: 0px 20px;
}
.nav ul li a {
font-size: 18px;
color: #000;
}
.sous {
width: 140px;
height: 39px;
float: right;
}
.inut {
width: 110px;
height: 39px;
border: none;
border-bottom: 1px solid #000;
float: left;
}
.btn {
width: 30px;
height: 30px;
background: url(../images/btn.jpg) no-repeat;
border: none;
margin-top: 10px;
}
.banner {
width: 1140px;
height: 364px;
margin-bottom: 25px;
}
.box1 {
width: 910px;
height: 90px;
margin: 0 auto;
margin-bottom: 40px;
}
.box1 .bx {
width: 88px;
height: 90px;
float: left;
margin: 0px 60px;
text-align: center;
font-size: 14px;
}
.box1 .bx img {
margin-bottom: 10px;
}
.tit {
height: 60px;
line-height: 60px;
padding-left: 20px;
font-size: 26px;
margin-bottom: 15px;
color: #464543;
}
.box2 {
height: 250px;
}
.box2 .bx2 {
width: 193px;
height: 250px;
float: left;
margin: 0px 17px;
text-align: center;
font-size: 16px;
}
.box2 .bx2 img {
margin-bottom: 15px;
}
.box3 {
height: 270px;
}
.box3 .bx3 {
width: 337px;
height: 270px;
float: left;
margin: 0px 18px;
}
.box3 .bx3 img {
margin-bottom: 10px;
}
.box3 .bx3 p {
line-height: 25px;
font-size: 16px;
}
.box4 {
height: 305px;
}
.box4 .bx4 {
width: 337px;
height: 305px;
float: left;
margin: 0px 18px;
}
.foot {
height: 123px;
background: #588fb8;
padding-top: 40px;
}
.foot p {
height: 30px;
line-height: 30px;
font-size: 14px;
color: #FFF;
text-align: center;
}
.title2 {
height: 60px;
line-height: 60px;
margin-bottom: 20px;
}
.title2 h1 {
font-size: 26px;
padding-left: 20px;
font-size: 26px;
margin-bottom: 15px;
color: #464543;
font-weight: normal;
}
.music {
width: 1140px;
height: 1050px;
}
.music ul {
padding: 0px;
}
.music ul li {
width: 206px;
height: 340px;
float: left;
margin: 0px 10px;
}
.music ul li img {
width: 206px;
height: 224px;
margin-bottom: 15px;
}
.music ul li h1 {
height: 25px;
line-height: 25px;
font-size: 14px;
font-weight: normal;
}
.music ul li h1 a {
color: #000;
}
.music ul li h2 {
height: 25px;
line-height: 25px;
font-size: 14px;
font-weight: normal;
color: #b3afaf;
}
/*--登陸注冊---*/
.neir {
width: 1140px;
margin-bottom: 100px;
overflow: hidden;
}
.conr {
width: 380px;
height: 416px;
background: #cbe7fc;
margin: 0 auto;
}
.lewm {
width: 381px;
height: 381px;
}
.login {
width: 308px;
height: 300px;
margin: 0 auto;
padding-top: 30px;
}
.login-title {
height: 20px;
line-height: 20px;
font-size: 14px;
color: #3c3c3c;
padding-bottom: 20px;
font-weight: 700;
}
.txt {
width: 300px;
height: 40px;
border: #CCC 1px solid;
margin-top: 10px;
}
.txt .wez {
width: 40px;
height: 40px;
float: left;
}
.txt .input {
width: 240px;
float: left;
padding-left: 20px;
color: #666;
height: 40px;
border: none;
}
.txt .input2 {
width: 290px;
float: left;
padding-left: 10px;
color: #666;
height: 40px;
border: none;
}
.passw {
width: 300px;
height: 20px;
margin-top: 20px;
font-size: 12px;
}
.password {
float: left;
}
.passw a {
text-decoration: none;
color: #333;
}
.zhuce {
float: right;
}
.lbtn {
width: 300px;
font-size: 16px;
margin-top: 25px;
height: 42px;
border: 0;
overflow: hidden;
vertical-align: middle;
line-height: 42px;
color: #fff;
background: url(../images/ico7.png) no-repeat;
}
.jies {
width: 1140px;
height: auto;
overflow: hidden;
margin: 0 auto;
}
.lv-box {
height: 225px;
padding: 20px 0px;
}
.lv-box img {
width: 300px;
height: 203px;
float: left;
margin-right: 20px;
}
.lv-box-r {
width: 820px;
height: 225px;
float: left;
}
.lv-box .lv-tit {
font-size: 16px;
height: 40px;
line-height: 40px;
font-weight: bold;
}
.lv-box p {
font-size: 14px;
line-height: 30px;
float: left;
text-indent: 2em;
}
.lv-box a {
color: #000;
}
.lv-box span {
height: 50px;
line-height: 50px;
float: right;
margin-right: 20px;
}
.lv-box span a {
color: #F00;
}
.nr {
width: 1140px;
height: auto;
overflow: hidden;
background: #FFF;
padding-top: 20px;
padding-bottom: 20px;
}
.neititle {
height: 50px;
line-height: 50px;
font-size: 18px;
text-align: center;
border-bottom: #CCC 1px dashed;
margin-bottom: 20px;
}
.llbx1 {
height: auto;
overflow: hidden;
margin-bottom: 30px;
}
.img1 {
margin: 0px 20px;
float: left;
float: left
}
.img2 {
margin: 0px 20px;
float: left;
float: right;
}
.llbx1 p {
font-size: 16px;
line-height: 30px;
text-indent: 2em;
}
四撰筷、??更多源碼
【干貨分享】自學編程的小伙伴可以前往我的 gitee 倉庫(持續(xù)更新中...)
??【web學習指南】從web基礎陈惰、計算機基礎到前端常用框架的教程,涵蓋前端大部分必備知識(學習指南 + 技術(shù)文章 + 資源分享)