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>