How to make semi-transparent background using css in element? but the content in not transparent too? sorry for bad english. Thank you.
Changing the opacity of the background color only To achieve this, use a color value which has an alpha channel—such as rgba. As with opacity , a value of 1 for the alpha channel value makes the color fully opaque. Therefore background-color: rgba(0,0,0,. 5); will set the background color to 50% opacity.
Just import your PNG image in the editor on the left, set the desired opacity level in the options, and you'll instantly get a semi-transparent PNG on the right. Free, quick, and very powerful. Import a PNG – change its opacity.
GIF and PNG‑8 formats support one level of transparency—pixels can be fully transparent or fully opaque, but not partially transparent.
Click Picture Tools > Recolor > Set Transparent Color.
use rgba background.
background: rgba(0, 0, 0, 0.5);
values are in order red intensity, green intensity, blue intensity
the decimal value is the opacity, and it runs from 0 to 1.
if you need to customize it without too many difficulties, check out: css3 maker
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With