搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
CSS3教程
CSS3基础教程
源代码
清空
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS3透明度过滤效果示例</title> <style> img.transparent { -webkit-filter: opacity(80%); /* Chrome, Safari, Opera */ filter: opacity(80%); } img.highly-transparent { -webkit-filter: opacity(30%); /* Chrome, Safari, Opera */ filter: opacity(30%); } /* Some CSS to beautify this example */ table td{ padding: 10px; text-align: center; } </style> </head> <body> <table> <tr> <td> <img src="/run/images/parrot.png" alt="Parrot"> </td> <td> <img class="transparent" src="/run/images/parrot.png" alt="Parrot"> </td> <td> <img class="highly-transparent" src="/run/images/parrot.png" alt="Parrot"> </td> </tr> <tr> <td>原始图像</td> <td>opacity(80%)</td> <td>opacity(30%)</td> </tr> </table> </body> </html>
运行结果