網頁做好後不好看,我們需要修改,那麼怎麼修改呢
工具/原料
電腦
方法/步驟
如果是我們不需要的,我們就可以把div直接刪除,但是刪除div不能影響整體佈局,,現在我們把底部的刪除
我把底部的div刪除了,我們看看
我覺得,還是不好看,友情連結太大了,我想小點,我們就去修改它的屬性
*{background:#FF3399}
#baidu{background:#6633CC; height:700px; width:1000px; margin-left:auto; margin-right:auto}
#baidu1{background:#FF6666; height:100px; width:1000px;}
#baidu2{background:#FFCCFF; height:400px; width:1000px}
#baidu3{background:#66FFCC; height:200px; width:1000px}
#baidu1_1{background:#0033FF; height:80; width:80px; float:left}
#baidu1_2{background:#FF33CC; height:80px; width:920px; float:left; font-size:36px; line-height:80px}
#baidu1_3{background:#6600FF; height:20px; width:1000px; float:left}
.daohang{background:#FF0000; height:20px; width:249px; float:left; margin-left:1px; text-align:center; font-size:14px; line-height:20px}
.daohang a{color:#FFFFFF; text-decoration:none}
.daohang a:hover{font-weight:bold; background:#00FF66}
#zhuti1{background:#00CCFF; height:400px; width:200px; float:left}
#zhuti2{background:#6666CC; height:400px; width:500px; float:left}
#zhuti3{background:#CC00FF; height:400px; width:300px; float:left}
.zhuti2_zhong{background:#66FF00; height:180px; width:230px; float:left; margin-left:13px; margin-top:13px;}
#zhutizuo1{background:#999966; height:400px; width:90px; float:left}
#zhutizuo2{background:#9900FF; height:400px; width:110px; float:left}
.zhutizuo11{background:#33FF66; height:39px; width:90px; margin-top:1px; font-size:18px; text-align:center; line-height:39px}
.zhutizuo12{background:#333333; height:39px; width:110px; margin-top:1px; font-size:24px; text-align:center; line-height:39px}
.zhutiyou{background:#CCCCCC; height:185; width:135px; float:left; margin-left:10px; margin-top:10px}
.wenzhangbiaoti{background:#FF0000; height:30px; width:135px; text-align:center; font-size:16px; line-height:30px}
.wenzhangneiron{background:#CC9933; height:155px; width:135px; text-indent:2em}
.dibu{background:#666666; height:20px; width:1000px; margin-top:2px;}
.dibuyouqing{background:#FF66CC; height:20px; width:248px; float:left; margin-left:2px; font-size:12px; line-height:20px}
.dibuyouqing a{color:#FFFFFF; text-decoration:none}
.dibuyouqing a:hover{font-weight:bold; background:#00FF66}
我把它的屬性修改了,要改,就要把整個div都改了,因為dibuyouqing是在dibu裡面的,所以兩個都要改,我們看看效果
現在底部還有一大截空出來,還是不好看,我們繼續把它剪掉
*{background:#FF3399}
#baidu{background:#6633CC; height:520px; width:1000px; margin-left:auto; margin-right:auto}
#baidu1{background:#FF6666; height:100px; width:1000px;}
#baidu2{background:#FFCCFF; height:400px; width:1000px}
#baidu3{background:#66FFCC; height:20px; width:1000px}
#baidu1_1{background:#0033FF; height:80; width:80px; float:left}
#baidu1_2{background:#FF33CC; height:80px; width:920px; float:left; font-size:36px; line-height:80px}
#baidu1_3{background:#6600FF; height:20px; width:1000px; float:left}
.daohang{background:#FF0000; height:20px; width:249px; float:left; margin-left:1px; text-align:center; font-size:14px; line-height:20px}
.daohang a{color:#FFFFFF; text-decoration:none}
.daohang a:hover{font-weight:bold; background:#00FF66}
#zhuti1{background:#00CCFF; height:400px; width:200px; float:left}
#zhuti2{background:#6666CC; height:400px; width:500px; float:left}
#zhuti3{background:#CC00FF; height:400px; width:300px; float:left}
.zhuti2_zhong{background:#66FF00; height:180px; width:230px; float:left; margin-left:13px; margin-top:13px;}
#zhutizuo1{background:#999966; height:400px; width:90px; float:left}
#zhutizuo2{background:#9900FF; height:400px; width:110px; float:left}
.zhutizuo11{background:#33FF66; height:39px; width:90px; margin-top:1px; font-size:18px; text-align:center; line-height:39px}
.zhutizuo12{background:#333333; height:39px; width:110px; margin-top:1px; font-size:24px; text-align:center; line-height:39px}
.zhutiyou{background:#CCCCCC; height:185; width:135px; float:left; margin-left:10px; margin-top:10px}
.wenzhangbiaoti{background:#FF0000; height:30px; width:135px; text-align:center; font-size:16px; line-height:30px}
.wenzhangneiron{background:#CC9933; height:155px; width:135px; text-indent:2em}
.dibu{background:#666666; height:20px; width:1000px; margin-top:2px;}
.dibuyouqing{background:#FF66CC; height:20px; width:248px; float:left; margin-left:2px; font-size:12px; line-height:20px}
.dibuyouqing a{color:#FFFFFF; text-decoration:none}
.dibuyouqing a:hover{font-weight:bold; background:#00FF66}
因為底部多出來的是整體和baidu3裡面的,所以就要在這裡修改
要新增新的div也是一樣的,我們也需要在你想要的地方新增,我就在導航下面添加了一個
定義屬性後看看,已經出現了一個灰色的框框
大家只要知道佈局,怎麼定義,一個網頁就可以做出來了
注意事項
修改尺寸的時候,關聯的地方也要修改