首頁  >  文章  >  web前端  >  如何平铺整个页面_html/css_WEB-ITnose

如何平铺整个页面_html/css_WEB-ITnose

WBOY
WBOY原創
2016-06-24 12:25:341988瀏覽

我做了一个小小的测试但是不成功,想让导航条横铺整个浏览器页面图片如下
就是红色那部分没有到浏览器边缘。
css设置如下:

#top_01 {    background:#f7f7f7;    height: 30px; border-bottom:1px solid #eee;}#top_02{ height:100px;}#top_03{background: none repeat scroll 0% 0% 	rgb(227, 58, 61);    background-color: rgb(227, 58, 61);    background-image: none;    background-repeat: repeat;    background-attachment: scroll;    background-position: 0% 0%;    background-clip: border-box;    background-origin: padding-box;    background-size: auto auto;height: 35px;}div{margin:0;padding:0;}#head {    width: 100%;    height: auto;    margin: 0px auto;    background-repeat: repeat-x;    background-position: center 152px;}

分别对应三部分,我应该添加什么进去才能达到效果


回复讨论(解决方案)

*{	margin:0;	padding:0;}


...

body{
   margin:0;padding:0;
}

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn