清风细雨楼 Design By www.eepep.com

效果预览:

css 背景透明 实现代码 
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>

清风细雨楼 Design By www.eepep.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
清风细雨楼 Design By www.eepep.com