用CSS的 filter 来轻松实现Div半透明
.Demo
{
background : #000 ; background : rgba(0,0,0,0.6) ; filter : alpha(opacity=40) ;
}
background : #000 ; background : rgba(0,0,0,0.6) ; filter : alpha(opacity=40) ;
}
<
div
class
="Demo"
>
hooyes!
</
div
>
点击查看效果
Hello hooyes!
看到屏幕的右上角了半透明的图层了吗?