實(shí)例效果圖:
整體觀察思考:
在開(kāi)始制作頁(yè)面前,我們首先要觀察圖的結(jié)構(gòu),考慮怎樣布局,布局對(duì)一個(gè)網(wǎng)站來(lái)說(shuō)非常重要,他是整個(gè)體系的骨骼。
再看此圖
很經(jīng)典的三行兩列結(jié)構(gòu),分為四塊,TOP、RIGHT、LEFT、BOTTOM。如下圖

以上我們思考過(guò)整體的結(jié)構(gòu),接下來(lái)我們要考慮如何把思考出來(lái)的結(jié)構(gòu)變化成"骨骼"
如下圖(盒模型來(lái)分析)

制作流程:
主體制作 --> 細(xì)節(jié)制作
一、制作主體:
xhtml:
div class="editorChoose">
h1>/h1>
div class="edRight"> /div>
div class="edLeft"> /div>
div class="edBottom">/div>
/div>
css:
@import url("http://www.07art.com/public/public.css");
.editorChoose{width:591px;height:400px;border:1px solid #aaa;background:#fff;}
/*TOP內(nèi)容*/
.editorChoose h1{height:30px;line-height:30px;border-bottom:1px solid #aaa;text-align:center;font-weight:bold;color:#000;background:#efefef;}
/*LEFT內(nèi)容*/
.edLeft{float:left;width:142px;height:317px;border-right:1px solid #aaa;overflow:auto;}
/*RIGHT內(nèi)容*/
.edRight{float:right;width:448px;height:317px;overflow:auto;}
/*BOTTOM內(nèi)容*/
.edBottom{clear:both;padding-top:15px;height:35px;border-top:1px solid #aaa;text-align:center;background:#efefef;}
骨骼出來(lái)了,接下來(lái)我們?cè)撛诠趋郎咸砑?血"遇"肉",這樣才算完整的.
二、細(xì)節(jié)制作:
(1) TOP制作
先來(lái)看一下TOP容器中的細(xì)節(jié)部分。

看上去這里很簡(jiǎn)潔,文字居中,關(guān)閉按鈕居右并且距上8px、距右10px的距離。
考慮TOP的結(jié)構(gòu),關(guān)閉按鈕在右邊,那么我們就要給關(guān)閉按鈕一個(gè)右浮動(dòng)(float:right;)。
注意:當(dāng)關(guān)閉按鈕要右浮動(dòng)的時(shí)候,關(guān)閉按鈕放在文字前面。
h1>a href="#">img src="images/dot30.gif" alt=""/>/a>選擇圖片/h1>
相對(duì)應(yīng)的css
.editorChoose h1{height:30px;line-height:30px;border-bottom:1px solid #aaa;text-align:center;font-weight:bold;color:#000;background:#efefef;}/*文字居中*/
.editorChoose h1 img{float:right;margin:8px 10px 0px 0px;}/*圖片居右*/
(2) RIGHT制作
看一下RIGHT容器中的細(xì)節(jié)部分。

紅塊區(qū)域?yàn)橹貜?fù)區(qū)域,所以只做一塊,然后copy就可以.
div>
input name="checkbox" type="checkbox" value="" />
img src="images/pic02.jpg" alt=""/>
/div>
相對(duì)應(yīng)的css
.edRight div{width:95px;padding:18px 0px 12px 10px;float:left;}
.edBottom{clear:both;padding-top:15px;height:35px;border-top:1px solid #aaa;text-align:center;background:#efefef;}
(3) LEFT制作
看一下RIGHT容器中的細(xì)節(jié)部分。

這是一個(gè)列表性質(zhì)的圖,首先就要考慮ul li。
h2 標(biāo)簽寫(xiě)相冊(cè)“相冊(cè)列表”位置
ul 寫(xiě)下面的列表,并用overflow:auto;來(lái)控制滾動(dòng)條,
xhtml:
h2>span>相冊(cè)列表/span>/h2>
ul>
li>a href="#">我的一家幸福生活/a>/li>
li>a href="#">包身工是怎么死的?/a>/li>
li>a href="#">楊文你真是個(gè)混蛋!/a>/li>
li class="background">a href="#">小白被拋棄/a>/li>
li>a href="#">我的一家幸福生活/a>/li>
li>a href="#">梔子花開(kāi)/a>/li>
li>a href="#">我的野蠻女友/a>/li>
li>a href="#">藍(lán)色生死戀/a>/li>
li>a href="#">這該死的愛(ài)/a>/li>
li>a href="#">湖南大學(xué)/a>/li>
li>a href="#">新一佳/a>/li>
li>a href="#">新一佳/a>/li>
li>a href="#">新一佳/a>/li>
li>a href="#">新一佳/a>/li>
li>a href="#">新一佳/a>/li>
/ul>
css:
.edLeft h2{padding:1px 1px 0px 1px;height:26px;border-bottom:1px solid #aaa;}
.edLeft h2 span{text-align:center;height:25px;background:#BFBDBD;color:#000;text-align:center;font-weight:bold;line-height:25px;display:block;}
.edLeft{float:left;width:142px;height:317px;border-right:1px solid #aaa;}
.edLeft ul{height:290px;overflow:auto;}
.edLeft li{height:27px;line-height:27px;border-bottom:1px solid #aaa;padding-left:10px;}
.edLeft li a{color:#000;}
.edLeft li a:link,.edLeft dd a:visited{text-decoration:none;}
.edLeft li a:hover{text-decoration:underline;}
.edLeft li.background{background:#ECEBEB;}
(4) BOTTOM制作

這里我把按鈕寫(xiě)成input的形式
input type="button" name="button" value="確 定"/> input name="button" type="button" value="取 消"/>
相對(duì)應(yīng)的css
.edBottom input{width:37px;height:22px;color:#000;border:1px solid #555;background:#aaa;}