我有一个简单的页面
<!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 中删除了加载器,所以空白不是来自那里
[1http://i.stack.imgur.com/2Scaw.jpg”>
我不想使用任何类型的页脚,因为我的页面使用背景和 Canvas 。
如果我有图片作为主题背景,如何去除白线
最佳答案
我假设您正在尝试使 div 与其他内容重叠。
尝试将位置属性设置为 fixed,如下所示:
<div id="preloader" style='background-color: #FF5794; position: fixed; height: 100%; width: 100%; left: 0px; top: 0px;'> </div>
这将使位置相对于视口(viewport)。 这意味着当用户滚动时,div 将跟随用户并停留在屏幕上的同一位置。
关于jquery - 如何删除内容下方的空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21757300/