I am attempting to scale a div with an inner shadow and an image inside. Below is the code snippet:
<!DOCTYPE html>
<html>
<head>
<title> Home Page </title>
<style>
div#b{
box-shadow:0 0 10px 2px #fff inset;
border-radius:10px;
width:230px;
height:150px;
transition: all 1s ease;
}
div#b:hover {
position:relative;
z-index:3;
transform:scale(1.2,1.2) rotate(0.02deg);
}
div#b img{
width:230px;
height:150px;
border-radius:10px;
position: relative;
z-index:-2;
}
</style>
</head>
<body>
<div id="b">
<a href="#">
<img src="img.jpg" alt="img" title="myimg">
</a>
</div>
</body>
</html>
One issue I am facing is that when hovering over the div, the image covers the div's inner shadow.
I have attempted setting z-index:3 on the div:hover, but with no success. Can you provide any assistance?
Thank you in advance