最佳答案
下面的 css 在两个 div 上设置了一个单独的背景; 如果图像不适合 div 大小,它们会重复自己。
如何使用 css 扩展图像以适应 div 所需的空间?
<style type="text/css">
#contentMain {
margin-bottom: 5%;
margin-top: 10%;
margin-left: 10%;
margin-right: 10%;
background: url( /jQuery/mypage/img/background1.png )
}
#page1 {
background: url( /jQuery/mypage/img/background2.png )
}
</style>