日期:2013-5-1 浏览次数:20204次

  <!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=utf-8" />
  <title>无标题文档 - www.cxybl.com</title>
  <style type="text/css">
  *{margin:0 auto;}
  body{ background-image:url(sdfsdfds.jpg); }
  .div{
  background:rgba(0, 0, 0, 0.4) none repeat scroll 0 0 !important;/*实现FF背景通明,文字不通明*/
  filter:Alpha(opacity=40); background:#000000;/*实现IE背景通明*/ (这里是关键)
  color:#FFF;
  width:500px;
  height:500px;
  border:1px solid #FF0;
  font-size:18px;
  text-align:center;
  font-weight:bold;
  margin-top:120px;
  }
  .div p{position:relative;} (这里position:relative款式必须有,否则IE下内容也跟着通明了!!!)
  </style>
  </head>
   
  <body>
  <div class="div"><p>我是文字</p></div>
  </body>
  </html>