我试图创建这个站点的第一部分的效果:
在调整窗口大小时改变div的高度,以便背景图像保持其高宽比,并且仍然可以看到位于div底部的链接。
我现在的方法只是调整调整大小的背景图像的宽度。我在div上有一个固定的高度,这样它的高度就不会在内容上崩溃。然而,我想做它,以便背景图像决定高度。
.landingPage {
position: relative; //<--This is only here for some absolutely positioned elements in the div
height: 950px;
width: 100%;
b
如果这是好做法呢?
<div>
<div style="float:left;">
text a
</div>
<div style="float:right;">
text b
</div>
<div style="clear:both;"></div>
</div>
<div>
text c
</div>
对于包含“文本c”的div,即使我对该d