在我的佈局中,我創建了以下jsfiddle託管的可調整大小的粘性頁腳。但是,在調整大小時,它與內容重疊。無論如何要讓它在所有瀏覽器上響應?可調整大小的粘性頁腳與內容重疊 - 修復
$(function() {
$('.footer').resizable({
handles: 'n, s'
}).bind('resize', function(){
$(this).css("top", "auto");
});
});
<div class="footer">
<p> footer content here </p>
</div>
CSS:
.footer {
color: #ffffff;
position: fixed !important;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
z-index: 1000;
height: 60px;
background-color: #333333;
}
不確定,因爲我沒有遇到這個問題。我已經更新了小提琴http://jsfiddle.net/v71tsx97/,所以你可以重新檢查。無論如何,謝謝你的解決方案也可以。 – mediaroot 2014-11-05 11:33:44
如何調整窗口大小時添加一個函數? ('。(window).resize(function(){(「.footer」).css(「position」,「relative!important」); });'你也可以改變z索引,所以它不會重疊 – Billy 2014-11-05 11:59:14