0

Is there a way to have two different background images, one attached to each side of a div element, that do not insist on statically appearing when the window is resized smaller? In other words, if the div element is 900px wide and viewed on a small laptop, it will remain centered but only enough of the left and right backgrounds appear as required by the viewport size.

I think I've exhausted my limited CSS knowledge on this one.

4

1 回答 1

0

我认为你必须重新考虑这个问题。只能有 1 个背景。但是,如果需要,您仍然可以通过在居中div 的每一侧使用具有不同背景的相同尺寸的 div 来获得相同的效果,方法是一个向右浮动,另一个向左浮动。并且您可能需要考虑查看Jquery Accordion for Vertical Accordions 以提供该效果。

于 2012-04-23T21:05:54.683 回答