问题描述:
直接上图,看这个p标签的效果,再看下p标签的样式,设置了width=100%,还是会出现留白问题。
p{
color:#808080;
align:center;
text-align:left;
width:100%;
height:30px;
line-height:30px;
margin:0;
/* padding-left:80px; */
top:0;
background:#e8e8e8;
}
解决办法:
body{
background-repeat:no-repeat;
background-color:white;
width:100%;
/* color:white; */
}
body元素中添加width=“100%”,标签留白问题就解决啦。
拓展:
对于其他的界面/浏览器留白问题,可尝试添加:margin:0;top:0;。