CSS层透明效果,兼容性很好_层和布局特效

模板酷站
  •       3/5
  •       1
  •       2
  •       3
  •       4
  •       5
查看演示效果

      织梦DedeCMS视频教程买空间 租服务器 选网硕互联! 无忧站长工具,百度权重一键全查!

      又一个CSS层透明效果,每次遇到这种代码实现的方法都不一样,当然是最简便最好了,这段代码就很简洁,而且兼容性好,实现的效果也不错,比较理想了,至于透明度,这个可以自己改一下。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>CSS层的半透明效果 - /</title> <meta http-equiv="mrc-Type" mrc="text/html;charset=gb2312"> <style type="text/css"> body {1122123<img src='http://p1.mb5u.com/texiao/3/20100522231252307.gif' _fcksavedurl='http://p1.mb5u.com/texiao/3/20100522231252307.gif'>2244234background:url('http://p1.mb5u.com/texiao/3/20100522231252307.gif');} #box {position:relative; overflow:hidden; z-index:1; width:462px; margin:0 auto; border:1px solid #333;height:300px;paddign:30px;} #box #opa {position:absolute; z-index:-1; width:100%; height:100%; top:0; left:0; background:#fff; filter:alpha(opacity=86); opacity:0.6;} * #box #opa {height:10000px; height:10000px;} </style> </head> <body> <div id="box"><center><br><br><br>这个层是不是半透明了呢?</center><div id="opa"></div></div> </body> </html>