页脚底部的页脚

时间:2012-08-01 15:42:42

标签: html css

我有一个页面进入我的网站,当我每次在页面底部向下滚动页脚页面时,我希望页脚停留在页面底部。 现在,当我向下滚动页脚保持在相同的位置,而不是在页面的底部 我不知道问题是否是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&ugrave;!!<br />
Una  caldaia periodicamente controllata &egrave; 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;
}

1 个答案:

答案 0 :(得分:2)

这是一个常见问题。这是一个很好的,众所周知的跨浏览器解决方案:

Make the Footer Stick to the Bottom of a Page

相关问题