4
I have a 950x350 pixel div and would like to create a perspective (and blurred) shadow as shown in the code below (run in full screen):
#slider{
width: 950px;
height: 350px;
background: blue;
position: relative;
}
#slider img{
width: 962px;
height: 31px;
position: absolute;
left: -6px;
bottom: 0px;
}
<div id="slider">
<img src="https://i.stack.imgur.com/OGKsw.png">
</div>
I did creating an image in Photoshop and placing it below the div, but I would not use image for this, would be 1 request less. It is possible and how to get this effect using HTML/CSS?
Well master pasta, I just included an option, but I only used rotatX and perspective on the father... I think your result is even easier to customize
– hugocsl
It was cool, just made some mods and was perfect, see: https://i.stack.Imgur.com/6jWUA.png
– Sam
If you have patience, don’t do as I did of rotating through the middle, try to pick up the axle on the "foot" of the rectangle, which gives a dry CSS
– Bacco
Although since you’re working at a fixed size, it doesn’t make much difference. If you are going to do something "responsive" (I hate this term) you need to change the center of rotation to be more "automatic" the size (without having to move in Z)
– Bacco
And worse it will be responsive rs... but I manage here, thanks for the tips.
– Sam