我想製作一些類似於apple.com主頁底部的4個盒子,但我希望它們可以是變高。可變高度與自定義背景圖像 - 什麼是最好的技術?
我能想到的最簡單的技術是有兩個div。第一個含除了在其背景圖像底部的「上限」的一切,並與底蓋的第二個div,像這樣:
<div class="top-and-middle">
</div>
<div class="bottom">
</div>
/-----------------\ ^
| | |
| | |
| top-and-middle | | <this height can stretch
| | |
| | v
-------------------
| bottom |
\-----------------/
但是,這在我看來是不那麼優雅有..它更好的方法?也許只有一個div?最好只使用CSS,但也可能使用PHP或Jquery。