Ie7 + background transparent text opaque super simple implementation method

  • 2020-03-30 01:24:15
  • OfStack

< img border = 0 SRC = "/ / files.jb51.net/file_images/article/201401/2014117165952543.png" >

The complete code is as follows:


<!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=gb2312" />
<title>ie7+ Background transparent, text opaque super simple method </title>
<style>
p{margin:0;padding:0;}
.bg{width:280px;padding:5px;margin:10px 0 10px;}
.bg1{background:#000;color:#fff;}
.bg2{background:#f60;}
.com{background:url(http://images/css_bg.png) repeat 0 0;border:1px solid #eee;border-radius:5px;font-size:12px;padding:5px;line-height:20px;}
</style>
</head>
<body>
 <div class="bg bg1">
  <div class="com"><p> The background is transparent, the text is opaque. Ha ha. IE 6 Fuck off! <br /> Support: <br />IE7.0+/FF3.0+/Opera10+/Chrome/Safari <br /> All tests passed. The transparency is: 20%</p></div>
 </div>
 <div class="bg bg2">
  <div class="com"><p> The background is transparent, the text is opaque. Ha ha. IE 6 Fuck off! <br /> Support: <br />IE7.0+/FF3.0+/Opera10+/Chrome/Safari <br /> All tests passed. The transparency is: 20%</p></div>
 </div>
</body>
</html>


Related articles: