我的网站中有一个页面,当我向下滚动页面时,页脚每次都位于页面底部时,我希望页脚保持在页面底部。现在,当我向下滚动页脚时,页脚保持在同一位置并且不进入页面底部,我不知道问题是否出在 jquery 中制作的 backstretch 插件,但这是我的代码:
<title>Atec Clima</title>
<script>
$.backstretch("img/bg.jpg",{speed: 500});
</script>
</head>
<body>
<div class="container">
<?php require("_header.php");?>
<div class="page">
<div class="riquadri">
<img src="img/home/riscaldamento.jpg" alt="riscaldamento" />
<p>
Una caldaia ben mantenuta consuma meno… risparmia energia e dura di più!!<br />
Una caldaia periodicamente controllata è garanzia di sicurezza per l’utente e per l’ambiente.
<title>Atec Clima</title>
<script>
$.backstretch("img/bg.jpg",{speed: 500});
</script>
</head>
<body>
<div class="container">
<?php require("_header.php");?>
<div class="page">
</div>
</div>
<div class="footer">
</div>
</body>
</html>
body {
font-family: UbuntuRegular;
font-size: 62.8%;
width: 100%;
height: 100%;
background: #fff url(../img/bg.jpg) top center no-repeat;
}
.container {
width: 1000px;
height:100%;
margin: 0 auto -140px;
overflow: hidden;
top: 0;
bottom: 0;
left: 0;
z-index: 2;
padding-bottom:140px;
}
.footer{
background:#1357c6;
position:absolute;
bottom:0;
width:100%;
height:140px;
}