全屏时,白色空间出现在浏览器窗口右侧

时间:2015-08-05 18:03:56

标签: html css

当浏览器窗口全屏显示时,浏览器窗口的右下方有一个巨大的白色矩形区域。有人知道怎么摆脱这个吗?

JSFiddle:http://goo.gl/mTWfsj

1 个答案:

答案 0 :(得分:1)

您在.copyright2

上有这种风格
.copyright2{

    position: relative;
    left: 17.5%;
}

p {
    width: 100%;
}

因此.copyright2的宽度为100%,从left: 17.5%

开始

要解决此问题,请从left: 17.5%

中删除.copyright2

这里有一个简单的例子来说明:

.red{
  background: red;  
  height: 100px;
}

.blue{
  background: blue;  
  height: 50px;
  position: relative;
  left: 50px;
}
<div class="red">
  <div class="blue"></div>
</div>