当前位置: 代码迷 >> HTML/CSS >> 一个背景颜色的有关问题
  详细解决方案

一个背景颜色的有关问题

热度:34   发布时间:2013-01-04 10:04:14.0
一个背景颜色的问题
代码大致是这样的,就是要在一个背景颜色上层叠上一张背景图片,不用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未设置,所以看不到图片
  相关解决方案