RGBA supported and browser safari 1.2+, Chorome 1+, Firefox 1.5+, Opera 9+, IE9 Beta.
Contoh Color RGBA
Color Name | rgb (R,G,B) | rgba (R,G,B,a) | |||||||||||
RGB | 1.0 | 0.9 | 0.8 | 0.7 | 0.6 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1 | 0.0 | ||
black | rgba (0,0,0) | ||||||||||||
navy | rgba (0,0,128) | ||||||||||||
blue | rgba (0,0,225) | ||||||||||||
green | rgba (0,128,0) | ||||||||||||
teal | rgba (0,128,128) | ||||||||||||
lime | rgba (0,225,0) | ||||||||||||
aqua | rgba (0,225,225) | ||||||||||||
maroon | rgba (128,0,0) | ||||||||||||
purple | rgba (128,0,128) | ||||||||||||
olive | rgba(128,128,0) | ||||||||||||
gray | rgba (128,128,128) | ||||||||||||
silver | rgba (192,192,192) | ||||||||||||
red | rgba (255,0,0) | ||||||||||||
fuchsia | rgba (255,0,255) | ||||||||||||
yellow | rgba (255,255,0) | ||||||||||||
white | rgba (255,255,255) |
Penerapan color rgba
<html> <style type="text/css"> h1 { color: rgba(225,0,0,0.8); } </style> <body> <h1>TEXT RGBA</h1> </body> </html>
Hasilnya:
TEXT RGBA
Contoh:
Background rgba
Background rgba
<html> <head> <style type="text/css"> #rgba { width:auto; height: 150px; margin:10px; background: #DCFE3D; } #rgba1 { width:300px; height: 150px; float:left; background: rgba(0,0,0,0.3); text-shadow: 2px 0px 2px rgba(0,0,0,0.5); } #rgba2 { width:450px; height: 150px; float:left; left: -50px; position:relative; background:rgba(0,0,0,0.7); border-radius: 0px 30px 30px 0px; color: #fff; } </style> </head> <body> <div id="rgba"> <div id="rgba_1"> <h1>RGBA COLORS</h1> </div> <div id="rgba2"> <p>rgba color transparance rgba color transparance rgba color transparance rgba color transparance rgba color transparance rgba color transparance rgba color transparance rgba color transparance rgba color transparance rgba color transparance</p> </div> </div> </body> </html>
0 komentar:
Posting Komentar