rgba()CSS函数的用法
使用CSSrgb()函数通过RGB模型定义颜色。
使用CSSrgba()函数设置不透明的RGB颜色。
您可以尝试运行以下代码以使用rgba()方法设置颜色:
示例
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
background-color:hsl(0,100%,50%);
}
h2 {
background-color:rgb(0,0,255);
color: rgb(255,255,255);
}
p {
background-color:rgba(255,0,0,0.9);
}
</style>
</head>
<body>
<h1>Red Background</h1>
<h2>Blue Background</h2>
<p>This is demo text!</p>
</body>
</html>热门推荐
10 对睡觉的祝福语简短
11 二胎祝福语简短霸气
12 新年祝福语简短的个性
13 送礼祝福语男性生日简短
14 良师益友祝福语简短
15 生日祝福语简短蛋糕上
16 高中升学宴祝福语简短
17 毕业英语祝福语大全简短
18 祝朋友祝福语简短好看