[英]White Space below the image
I have a HTML page in which i have a page and inside it i have a content and inside it i have a div now when i set the image of last div . 我有一个HTML页面,在其中有一个页面,在其中有一个内容,在其中有一个div,当我设置last div的图像时。 there show white space below the image and make the html page in scroll position.
在图片下方显示空白,并使html页面处于滚动位置。 I don't want white space and want to fit the page according to the device height and width.
我不需要空格,而是要根据设备的高度和宽度来适合页面。 But i am unable to achieve it any help would be highly appreciated
但我无法实现这一目标,将不胜感激
Here is my code : 这是我的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="user-scalable=no" id="viewport_meta" />
<script type="text/javascript">
var viewport_meta = document.getElementById('viewport_meta');
var w = screen.availWidth;
var h = screen.availHeight;
viewport_meta.setAttribute('content', 'width=' + w + ', height=' + h + ',user-scalable=no');
</script>
<script src="tizen-web-ui-fw/latest/js/jquery.js"></script>
<script src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js" data-framework-viewport-scale="false"></script>
<script type="text/javascript" src="./js/main.js"></script>
<script type="text/javascript" src="./js/swipe.js"></script>
<script src="tizen-web-ui-fw/latest/js/jquery.min.js"></script>
<script type="text/javascript" src="./jquery.mobile-1.3.0.js"></script>
<link rel="stylesheet" type="text/css" href="./css/style.css" />
</head>
<body>
<div data-role="page" id="page1">
<div data-role="content" data-scroll="none">
<div id="fullpage"></div>
</div>
</div>
</body>
</html>
On div id full page i have set background image: 在div id整页上,我设置了背景图片:
body {
background-repeat: no-repeat;
margin: 0;
overflow: hidden;
}
div {
width: 1280px;
height: 720px;
}
#page1{
width: 1280px;
height: 720px;
}
#fullpage {
background-image: url(../images/lastslide_en_752.jpg);
background-repeat:no-repeat;
background-size:60% 60%;
}
consider adding 考虑添加
background-repeat:no-repeat; background-size:100% 100%;
in the #fullpage Class 在#fullpage类中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.