1、看一下注釋便可,都是前面學到的知識,而後進行整合完成網頁的製做,未完待續,這個網易界面跨度可大三天。html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>D139_FrameworkeOfNeteasyInterface</title> <style> .header{ width:960px; height:80px; /*background-color: red;*/ margin: 0 auto; overflow: hidden; padding-top:14px; box-sizing: border-box;/*這裏咱們採用內上邊距的辦法將logo擠下去達到垂直居中的目的*/ /*同時這個box-sizing的屬性就是將這個header固定住,不讓他由於內邊距而變化大小了*/ } .content{ width: 960px; height: 600px; background-color: blue; margin: 0 auto; } .footer{ width: 960px; height: 48px; background-color: yellow; margin: 0 auto ; } .header .logo{ width:748px; height: 47px; background:url("image/netEasyLogo.jpg") no-repeat 0 0;/*從圖片的座標(0,0)開始鋪,no-repeat就是隻鋪這一張不要多鋪*/ /*margin-top: 12px;*/ float:left; } .header .links{ height: 42px; width: 150px; /*background-color: red;*/ float:right; } .header .logo a { width:156px; height:45px;/*測量出那一塊區域,而後這一塊區域都是超級連接*/ /*background-color: red;*/ display: inline-block;/*轉換爲行內塊級標籤*/ } .header .links a{ text-decoration:none;/*去掉下劃線*/ font-size: 16px; color:black; line-height: 45px;/*這裏複習了文字不能居中,使用這個屬性讓它和links盒子的高度一致,那就作到文字在盒子中居中*/ text-align: right;/*複習了文字右對齊*/ } .content{ width: 960px; height: 600px; } .content .top{ width: 960px; height: 38px; background-color: red; background: url("image/wangyi_center.jpg") 0 0;/*讓這張小圖片把top這個區域所有鋪滿*/ } .content .bottom{ width: 960px; height: 562px; background-color: green; } </style> </head> <body> <div class="header"> <div class="logo" > <a href="https://www.163.com/" title="網易163免費郵箱"></a><a href="https://www.126.com/" title="網易126免費郵箱"></a><a href="#" title="網易yeah免費郵箱"></a> <!--複習了a標籤的使用,title就是指鼠標放到超連接上就會顯示的文字--> </div> <div class="links"> <a href="http://www.baidu.com">瞭解更多</a>|<a href="#">反饋意見</a> </div> </div> <div class="content"> <div class="top"></div> <div class="bottom"></div> </div> <div class="footer"></div> </body> </html>
3、源碼:git
D139_FrameworkeOfNeteasyInterface.htmlgithub
地址:微信
https://github.com/ruigege66/HTML_learning/blob/master/D139_FrameworkeOfNeteasyInterface.html學習
2.CSDN:https://blog.csdn.net/weixin_44630050(心悅君兮君不知-睿)大數據
3.博客園:https://www.cnblogs.com/ruigege0000/ui
4.歡迎關注微信公衆號:傅里葉變換,我的帳號,僅用於技術交流,後臺回覆「禮包」獲取Java大數據學習視頻禮包url