首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:CSS 参考手册
TRY RUN / 在线示例
CSS 参考手册 尝试一下
CSS 参考手册 尝试一下
源代码
运行
<!DOCTYPE html> <html> <head> <style> div { background-color:red; opacity:0.5; filter:Alpha(opacity=50); /* IE8 and earlier */ } </style> </head> <body> <div>This element's opacity is 0.5! Note that both the text and the background-color are affected by the opacity level!</div> </body> </html>
运行结果