Http://service.ap-southeast-1.maxcompute.aliyun-inc.com/api, this DIV is in the semi-xiuming state, so that you can see the background or set off the text. When you place the cursor over the text, the DIV layer is completely opaque and the text is clearly displayed, generally, this effect must be used with JavaScript, which improves compatibility.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <Html xmlns =" http://www.w3.org/1999/xhtml "> <Head> <meta http-equiv =" Content-Type "content =" text/html; charset = gbk "/> <title> translucent Effect of image and text, move the mouse over opaque-bkjia.com </title> <style type = "text/css">. box {width: 600px; height: 600px; padding: 20px;} * {margin: 0; padding: 0;} body {background: url ( http://www.bkjia.com/ Uploads/allimg/091009/19413 CP9-0.jpg) no-repeat; width: 300px; height: 235px ;}. in_box {background: # fff; width: 293px; background: rgba (255,255,255, 0.4); filter: alpha (opacity = 40 );}. box. sub_con {position: relative; color: # 00F; width: 100% ;}. ff {background: # fff; width: 293px; background: rgba (255,255,255, 1); filter: alpha (opacity = 100 );} </style>
Tip: the code can be modified before running!