随笔-167  评论-65  文章-0  trackbacks-0

效果预览:

image

css:

   1:  <style type="text/css">
   2:  <!--
   3:  body{
   4:      margin:0;
   5:      padding:0;
   6:      background-color:#FFFFFF;
   7:  }
   8:  .alpha1,.alpha2{
   9:      width:100%;
  10:      height:auto;
  11:      min-height:250px;/* 必需 */
  12:      _height:250px;/* 必需 */
  13:      overflow:hidden;
  14:      background-color:#FF0000;/* 背景色 */
  15:  }
  16:  .alpha1{
  17:      filter:alpha(opacity=20); /* IE 透明度20% */
  18:  }
  19:  .alpha2{
  20:      background-color:#FFFFFF;
  21:      -moz-opacity:0.8; /* Moz + FF 透明度20%*/
  22:      opacity: 0.8; /* 支持CSS3的浏览器(FF 1.5也支持)透明度20%*/
  23:  }
  24:  .ap2{
  25:      position:absolute;
  26:  }
  27:  -->
  28:  </style>

html:

   1:  <!--S Demo-->
   2:  <div class="alpha1">
   3:    <div class="ap2">
   4:    <p>背景为红色(#FF0000),透明度20%。</p>
   5:    </div>
   6:    <!--[if IE]><![if !IE]><![endif]--> <div class="alpha2"></div> <!--[if IE]><![endif]><![endif]-->
   7:  </div>


write by feng
posted on 2009-04-27 13:05 fl1429 阅读(4423) 评论(0)  编辑  收藏 所属分类: Ajax

只有注册用户登录后才能发表评论。


网站导航:
 
已访问数:
free counters