Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

Show box-shadow through transparent object (div)

$
0
0

I'm working on a css3 3D page and i want to show the shadow through a transparent div but i can't get this to work...
I can't use a span or anything because it needs to be the same object because of jquery animation.

The basic div styling:

#Div3{
        position:absolute;
        border:1px solid white;
        border-radius:10px;        
        transition: all 1s;
        background:transparent;
        pointer-events: none;
    }

Adittional class for position + shadow + transform:

.P3{
        top:22.5%;
        bottom:25%;
        right:25%;
        height:55%;
        width:20%;
        margin-right:-10%;
        box-shadow:10px 0px 15px rgba(255,255,255,0.6);
        transform: perspective( 1000px ) rotateY( 330deg );
        -webkit-transform: perspective( 1000px ) rotateY( 330deg );
    }

Result:
The background is set to transparent but it won't show the box-shadow behind it,

  • Does box-shadow only generates a shadow for the outline of the object?
  • Is there a way to make it visible using css?

Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>