Make background image of containing div show over background image of child div?
Is it possible to make the background image of a containing div show over the background image of a child div?
If I add a border to the parent div that does show over the child's background image, but a background image applied to the parent does not.
Tha开发者_JAVA技巧nks
No, it seems this is not possible.
Depending on what kind of effect you are going for, you can most likely use some css to mimic such an effect.
Have you tried using:
div.transparent
{
background-image:"imageLocation.jpg"
/* for IE */
filter:alpha(opacity=60);
/* CSS3 standard */
opacity:0.6;
}
Then just <div class="transparent">
for your div.
The opacity property effects everything in the <div>
. However, I think you can override it by adding another class with opacity 1.0 for your content.
Just a thought.
not sure why you'd want to do that but the only solution i can see is to use css z-index
to put the child div
behind the parent
精彩评论