如何删除内容下方的空白区域

时间:2014-02-13 14:41:10

标签: jquery html ios jquery-mobile safari

我有一个简单的页面

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css" />
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script>
   .ui-page-theme-a {
  background-image: url(../../Resources/Bingo/WebBingo/En/Common/Images/bg.png);
  -moz-background-size-: cover;
  -o-background-size-: cover;
  -webkit-background-size-: cover;
  background-size-: cover;
}
</head>
<body >
    <div id="preloader" style='background-color: #FF5794; position: absolute; height: 100%; width: 100%; left: 0px; top: 0px;'> </div>
</body>

当我在iPad上的safari中测试时,页面可以滚动,页面下方有一个空白区域。我怎么能删除它?删除元标记无效。我玩jquery.mobile-1.4.1的调试版本,这一行似乎与

有关
  

base = fauxEle = $(“”,{“href”:fauxBase})。appendTo(“head”   );

方法

中的

  

baseTagTest。

我从jqm中删除了加载程序,因此没有来自那里的空白

enter image description here

[1http://i.stack.imgur.com/2Scaw.jpg“&GT;

我不想使用任何类型的页脚,因为我的页面使用背景和画布。

如果我将图像作为主题背景,如何删除白线

2 个答案:

答案 0 :(得分:1)

我假设你试图让div与其他内容重叠。

尝试将position属性设置为fixed,如下所示:

<div id="preloader" style='background-color: #FF5794; position: fixed; height: 100%; width: 100%; left: 0px; top: 0px;'> </div>

这将使位置相对于视口。 这意味着当用户滚动时,div将跟随用户并保持在屏幕上的相同位置。

答案 1 :(得分:0)

您可以将css添加到您的身体标签

<style>
  body{
    margin:0;
    padding:0;
  }
</style>
相关问题