Love丶FFC's Blog
2019-08-27 18:36:32
阅读:800 • 评论:12
标签:前端
首先来看百度首页的样子。
现在开始仿写,百度首页的布局并不复杂。
在正式编写页面之前,我们应该先对页面进行重置,因为HTML中的标签都有各自的默认样式。
重置代码如下:
html,body,div,p,a,b,span,input,ul,li,ol,form,input,button{ margin: 0px; padding: 0px; border: 0px; } a{ text-decoration: none; color: #000000; } ul,li,ol{ list-style-type: none; }
编写该头部的方式非常多,但其中最关键的点是各个标签的浮动效果。
HTML代码如下:
<div class="Public-Header"> <ul> <li><a href="#">新闻</a></li> <li><a href="#">hao123</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> <li><a href="#">设置</a></li> <li><a href="#">更多产品</a></li> </ul> </div> <div class="Public-Icon"> <img src="https://www.baidu.com/img/bd_logo1.png"> </div>
CSS代码如下:
.Public-Header{ width:100%; height:auto; position: absolute; right:0; top: 0; margin-top: 15px; } .Public-Header ul{ float: right; height: 30px; line-height: 30px; font-size: 13px; font-weight: bolder; text-align: center; } .Public-Header ul li{ float: left; width:40px; margin:0px 10px 0px 5px; text-decoration: underline; } .Public-Header ul li:last-child{ width:60px; height:30px; background: #3388FF; font-weight: normal; } .Public-Header ul li a:hover{ color:#0000CC; } .Public-Header ul li:last-child a{ color:#FFFFFF; }
实现效果如图:
fruinly
real cialis online Other times I m out talking to clients and potential clients
engarma
best place to buy cialis online forum More than 200 drugs were found to list depression or suicidal symptoms as adverse effects, including the cancer focused medications
jordans for cheap
I just wanted to thank you for the fast service. and also they look great. I received them a day earlier than expected. prefer I will definitely continue to buy from this site. an invaluable I will recommend this site to my friends. Thanks!
jordans for cheap https://www.realjordansretro.com/
louis vuitton outlet online
I just wanted to thank you for the fast service. in addition to they look great. I received them a day earlier than expected. like I will definitely continue to buy from this site. blue jays I will recommend this site to my friends. Thanks!
louis vuitton outlet online https://www.bestlouisvuittonoutlet.com/
cheap louis vuitton outlet
I just wanted to thank you for the fast service. or they look great. I received them a day earlier than expected. most notably I will definitely continue to buy from this site. anyway I will recommend this site to my friends. Thanks!
cheap louis vuitton outlet https://www.cheapreallouisvuitton.com/
louis vuitton outlet online
I just wanted to thank you for the fast service. or even a they look great. I received them a day earlier than expected. for instance I will definitely continue to buy from this site. an invaluable I will recommend this site to my friends. Thanks!
louis vuitton outlet online https://www.louisvuittonsoutletstore.com/
cheap louis vuitton outlet
I just wanted to thank you for the fast service. while well as they look great. I received them a day earlier than expected. the same as I will definitely continue to buy from this site. regardless I will recommend this site to my friends. Thanks!
cheap louis vuitton outlet https://www.cheaplouisvuittonoutletonline.com/
cheap retro jordans
Read reviews and was a little hesitant since I had already inputted my order. perhaps but thank god, I had no issues. most notably the received item in a timely matter, they are in new condition. situation so happy I made the purchase. Will be definitely be purchasing again.
cheap retro jordans https://www.cheapauthenticjordanshoes.com/
louis vuitton outlet sale online
Read reviews and was a little hesitant since I had already inputted my order. as but thank god, I had no issues. enjoy the received item in a timely matter, they are in new condition. in any event so happy I made the purchase. Will be definitely be purchasing again.
louis vuitton outlet sale online https://www.louisvuittonsoutletonline.com/
Preliaf
3 with new cases and associated deaths for 2017 in USA being forecasted to account for more than 53, 000 and 43, 000, respectively 1 buy cialis online overnight shipping
Preliaf
Our case illustrates that in patients with ESRD and difficult to treat IDH, there is value in imaging the renal arteries to evaluate for renal artery stenosis cialis online cheap
KjcbJMzSY
levitra cout Whichever version of drug you are taking, it is still the same medication