IT/- 프로그래밍
HTML5/CSS3 색조,채도,명도 입력법
혁준7519
2017. 5. 24. 06:02
색조,채도,명도 입력법
hsl(색조, 채도, 명도)
hsla(색조, 채도, 명도, 투명도)
html)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, height=device-height, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0"> <title>Insert title here</title> <style> body { background : url(images/testimage.jpg); } p { width : 100%; font-size : 2em; /** hsl(색조, 채도, 명도) hsla(색조, 채도, 명도, 투명도) */ background-color : hsla(0, 0%, 80%, 0.5); } p span { font-weight : bold; font-size : 1.2em; color : hsla(0, 100%, 50%, 0.3); } </style> </head> <body> <p>가나다라마바사아자차카타파하아야어여오요우유으이<br/> <span>1234567890</span> </p> </body> </html> | cs |
결과)
투명도를 줘서 뒤의 배경이 보인다