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