I have an div
element in the web page and I'm going to set both background color and background image for it. The image has a transparent background, and I want the background color to be shown under the image. Is it possible?
Yeah you only need to have an image with a transparent background and after that you use this
body {background:#ffffff url('img_tree.png') no-repeat right top;}
the #ffffff
is the color that you want behind your image.
Very important that your image extension support transparency, use .png or .gif
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