hsla() CSS 函数的使用方法
如需使用色调饱和度亮度 (HSL) 模块定义颜色,请使用 hsla() CSS 方法。
还可以尝试运行以下代码,以便在 CSS 中实现 hsla() 函数
示例
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
background-color:hsl(0,100%,50%);
}
h2 {
background-color:hsl(192,89%,48%);
}
p {
background-color:hsla(290,100%,50%,0.3);
}
</style>
</head>
<body>
<h1>Red Background</h1>
<h2>Blue Background</h2>
<p>This is demo text!</p>
</body>
</html>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP