实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS rgba() 函数 实例 - 自学教程(runoops.com)</title> <style> #p1 { background-color: rgba(255, 0, 0, 0.3); } #p2 { background-color: rgba(0, 255, 0, 0.3); } #p3 { background-color: rgba(0, 0, 255, 0.3); } #p4 { background-color: rgba(192, 192, 192, 0.3); } #p5 { background-color: rgba(255, 255, 0, 0.3); } #p6 { background-color: rgba(255, 0, 255, 0.3); } </style> </head> <body> <p>RGB 颜色,并使用透明度:</p> <p id="p1">红色</p> <p id="p2">绿色</p> <p id="p3">蓝色</p> <p id="p4">灰色</p> <p id="p5">黄色</p> <p id="p6">樱桃色</p> </body> </html>
运行结果: