<div style="width:400pxheight:200pxmargin:200px autobackground-color:rgba(0,0,0,0.5)color:#ffftext-align:centerline-height:200px">这是文字这是文字</div>
</div>
已经用css定义了背景,添加图片使图片颜色与背景颜色一致,首先颜色,先确定好一种颜色,做为最终的颜色,修改图片的背景图片,可以去使用ps将背景颜色去掉,添加确定好的颜色,或者在是在css中修改背景颜色也是可以,具体看代码:<html>
<head>
<style>
#div1{
width:960px
height:200px
background-color:#f00
background:url('图片地址')
}
</style>
</head>
<body>
<div id='div1'>
<p>我是测试文字</p>
</div>
</body>
</html>