rgba() CSS 函式用法
使用 CSS rgb() 函式使用 RGB 模型定義顏色。
使用 CSS rgba() 函式設定帶有透明度的 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>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言
C++
C#
MongoDB
MySQL
Javascript
PHP