我在這裏有這個非常簡單的飛濺頁面:http://iph0wnz.com即使內容較少,我如何對齊網頁右下角的div?
它有中間的主要圖形,其次是我的'a'。標誌在右下角。我希望該徽標與整個頁面的右下角對齊,這意味着如果頁面中有很多文本內容,它就會出現在最後(即不會懸停在最上面),但是如果內容較少 - 就像現在一樣 - 那麼它應該對齊到屏幕的最底部,而不是在內容之後。
,我會盡量給文本例子就像我在How to align content of a div to the bottom?看到:
----------------------------- | less content, no scroll | | | | | | | | a. | ----------------------------- (screen height)
和
----------------------------- | more content, yes scroll | | the quick brown fox jump- | | ped over the lazy dog an- | | d she sells sea shells on | | the sea shore and some o- | | ther random text is put | (screen height) | here so there is a scroll | | bar because the content | | is too much for one scre- | | en to show. okay, I think | | that is enough. | | a. | -----------------------------
除了上面鏈接,其他的問題,我也看着How do I force a DIV block to extend to the bottom of a page even if it has no content?但沒也不適合我。
我知道這很簡單,但我只是厭倦了嘗試所有可以找到的技巧和竅門。
此外,當實際內容進入時,我想使用該方法在網站上放置徽標 - 這將成爲博客。
注意:如果需要實現此效果,我不介意使用JavaScript和jQuery。
這完全有效!萬分感謝! – aalaap 2009-07-25 03:14:32