CSS Basic: Opacity
Set the transparency with the CSS Opacity and RGBA
Published in
3 min readAug 9, 2021
In this article, we are going to talk about the opacity by setting the CSS opacity properties and also the RGBA.
Source code:
In the index page, it just has three <div> with yellow color and red text.
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><link rel="stylesheet" href="styles.css"></head><body><div>box</div><div>box</div><div>box</div></body></html>
We also add a lightblue background color to the body so it is easier to observer the…