我正在使用粘性頁腳方法用於Bootstrap 3.0,如其示例中所述。我有它工作得很好,這不是我正在努力。BS 3.0粘性頁腳,具有100%高度的子div
它要求包裝有以下幾點:
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto;
/* Negative indent footer by its height */
margin: 0 auto -60px;
/* Pad bottom by footer height */
padding: 0 0 60px;
}
現在我想裏面有一些100%高度容器,我不能因爲有自動對父的高度。有沒有辦法解決這個問題,並保持我的粘腳?我想放100%高度的容器,以便我可以放入背景。
感謝
嘗試增加的內容很多身體。 – thgaskell
是的..好點。 – ZimSystem
我已閱讀關於jQuery的粘腳,並想知道這是否是我唯一的解決方案。我想要做的是在左側放置可拉伸/全高的背景,並在右側放置內容。它將成爲Wordpress中的頁面模板,因此內容的數量會有所不同。 –