页面底部的随机空白区域,但仅限于移动版

时间:2016-03-11 15:00:50

标签: html css

您好我已经查看了几个有关如何从网页中删除空白区域的stackoverflow问题(请参阅下面的选项),但没有给出任何解决方案对我有任何影响。令人担忧的是,当我在移动设备上查看我的网站时,空格才显示出来。有问题的网站是:http://moduleplanner.github.io/及其相应的github回购邮件:https://github.com/Moduleplanner/Moduleplanner.github.io

感谢您的帮助。 :)

Huge White Space At Bottom Of Page

Eliminating white space at bottom of page

CSS White Space At Bottom of Page

Strange space at bottom of page on iOS

current state of whitespace

1 个答案:

答案 0 :(得分:1)

这是.degree元素上的CSS,特别是absolute定位。对于移动设备,请将css更改为以下内容;

@media only screen and (max-width: 640px){
 .degree{
   min-width: 100%;
   left: 0;
   right: 0;
 }
}

或者,甚至更好,以下;

@media only screen and (max-width: 640px){
 .degree{
   min-width: 100%;
   position: static;
 }
}

更新

@media only screen and (max-width: 640px){
 .degree{
   min-width: 100%;
   position: static;
 }

 .div.degree div.course{
   width: auto;
   max-width: 100%;
 }
}
相关问题