[英]How to remove white space below the content
我有一個簡單的頁面
<!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上的野生動物園中對其進行測試時,可以滾動頁面,並且頁面下方有空白。 我如何刪除它? 刪除元標記無效。 我玩的是jquery.mobile-1.4.1的調試版本,這行似乎與
base = fauxEle = $(“,” {“ href”:fauxBase})。appendTo(“ head”);
方法中
baseTagTest。
我從jqm中刪除了加載程序,所以空白不是從那里來的
[1http://i.stack.imgur.com/2Scaw.jpg“>
我不想使用任何頁腳,因為我的頁面使用背景和畫布。
如果我有圖像作為主題背景,如何刪除白線
我假設您正在嘗試使div與其他內容重疊。
嘗試將position屬性設置為fixed,如下所示:
<div id="preloader" style='background-color: #FF5794; position: fixed; height: 100%; width: 100%; left: 0px; top: 0px;'> </div>
這將使位置相對於視口。 這意味着,當用戶滾動時,div將跟隨用戶並停留在屏幕上的同一位置。
您可以將CSS添加到您的body標簽中,
<style>
body{
margin:0;
padding:0;
}
</style>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.