
Untitled
By: a guest on
May 9th, 2012 | syntax:
None | size: 1.64 KB | hits: 14 | expires: Never
putting a inset box shadow on an image or image within a div
<body>
<div id="logo">
<img src="images/key.jpg" width="3%" height="3%"/>
</div>
<a href="scene2.html" class="next">Next</a>
<a href="abduction.html" class="back">Back</a>
<img src="images/scene1.jpg" width="650" height="650" class="backing"/>
</body>
</html>
.backing {
position:relative;
z-index:-10;
float:left;
margin-left:12%;
box-shadow: 0 0 -50px -50px #FFF;
-moz-box-shadow: 0 0 -50px -50px #FFF;
-webkit-box-shadow: 0 0 -50px -50px #FFF;
}
.next {
position:relative;
margin-left:8%;
z-index:200;
}
.back {
position:relative;
margin-left:2%;
z-index:220;
}
<div class="box-shadow">
<img src="/images/graphic.jpg" />
</div>
.box-shadow {
background-color: #fff;
-webkit-box-shadow: inset 0 0 10px 10px #000;
-moz-box-shadow: inset 0 0 10px 10px #000;
box-shadow: inset 0 0 10px 10px #000;
height: 235px;
padding: 25px;
text-align: center;
width: 500px;
}
<div id="logo">
<img src="images/key.jpg" width="3%" height="3%"/>
</div>
<a href="scene2.html" class="next">Next</a>
<a href="abduction.html" class="back">Back</a>
<img src="images/scene1.jpg" width="650" height="650" class="backing"/>
.backing {
position:relative;
z-index:-10;
float:left;
margin-left:12%;
box-shadow: inset 0 0 50px 50px #FFF;
-moz-box-shadow: inset 0 0 50px 50px #FFF;
-webkit-box-shadow: inset 0 0 50px 50px #FFF;
}
.next {
position:relative;
margin-left:8%;
z-index:200;
}
.back {
position:relative;
margin-left:2%;
z-index:220;
}