The syntax to use the opacity property is as follows : Thus, the element and its children all have the same opacity relative to the element's background, even if they have different opacities relative to one another. The element is fully opaque (visually solid). Today, let’s look at how to do that with just CSS. Sometimes, hovering over an object changes its opacity too. In simple word, you can say that it specifies the clarity of the image. Here are a few ways to accomplish that: Here is the CSS: CSS The value of 1 is the default value and makes an element fully opaque. 60 percent opacity. But, if you just put the image behind your text, the text might be hard to read, so you want to also add a darker, semi-transparent overlay on top of the image, but behind the text. < div class = " text-blue-500 text-opacity-75 md:text-opacity-50 " >


Leave a Comment