.aaa{
filter:alpha(Opacity=80); /* IE有效 */
-moz-opacity:0.5; /* 火狐浏览器有效,IE无效 */
opacity: 0.5; /* 除IE外,所有浏览器都有效 */
}
- Generally use filter and opacity
- 0.5 means 50%
Second, the div is transparent, but the content in the div is not transparent
background:rgba(0,0,0,0.2);
0.2 is 20% transparency