现在的位置: 首页 > 综合 > 正文

DIV背景半透明,DIV中的字不半透明

2012年07月15日 ⁄ 综合 ⁄ 共 293字 ⁄ 字号 评论关闭
filter的层一定要有width属性,否则filter无效。

<div style="filter:alpha(opacity=50);background:#ffffff;width:600;"><span style="color:yellow">图层背景半透明,字体颜色也半透明</span></div>

<div style="filter:alpha(opacity=50);background:#ffffff;width:600"><span style="position:relative;color:yellow">图层背景半透明,字体颜色不半透明</span></div> 

抱歉!评论已关闭.