一、看一下注釋即可,都是前面學到的知識,然后進行整合完成網頁的制作,未完待續,這個網易界面跨度可大三天,
<!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>

三、原始碼:
D139_FrameworkeOfNeteasyInterface.html
地址:
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/
4.歡迎關注微信公眾號:傅里葉變換,個人賬號,僅用于技術交流,后臺回復“禮包”獲取Java大資料學習視頻禮包

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/98427.html
標籤:Html/Css
