
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Usage of rgba() CSS function
Use the CSS rgb() function to define color using the RGB Model.
Use the CSS rgba() function to set RGB colors with opacity.
You can try to run the following code to set color with rgba() function:
Example
<!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>
- Related Questions & Answers
- CSS rgba() Function
- Usage of calc() CSS function
- Usage of attr() CSS function
- Usage of var() CSS function
- Usage of rgb() CSS function
- Usage of hsl() CSS function
- Usage of hsla() CSS function
- CSS Transparency Using RGBA
- Usage of radial-gradient() CSS function
- Usage of linear-gradient() CSS function
- Usage of cubic-bezier() CSS function
- Usage of CSS transition-timing-function property
- Usage of repeating-linear-gradient() CSS function
- Usage of repeating-radial-gradient() CSS function
- Usage of CSS visibility:visible;
Advertisements