日期:2014-05-17  浏览次数:20530 次

一个背景颜色的问题
代码大致是这样的,就是要在一个背景颜色上层叠上一张背景图片,不用img的话请问有什么办法能够实现?

<style>
#search1{
width:100%;
position:relative;
z-index:50;
background:#7eb6e7;
repeat-y width: 180px;
height: 180px;
}
</style>

<div id="search1">
<div style=" z-index:100;background-image:url(images/search_bg.png)"></div>
</div>
------解决方案--------------------
你的内层div的width和height未设置,所以看不到图片