73
rated 0 times
[
77]
[
4]
/ answers: 1 / hits: 18254
/ 9 Years ago, thu, june 25, 2015, 12:00:00
I'm looking for how to add a play icon to Image on CSS.
I tried this code, but it doesn't appear right I want it to appear on the center :
.video { position: relative; }
.video a {
position: absolute;
display: block;
background: url(http://www.slatecube.com/images/play-btn.png);
height: 100%;
width: 100%;
top: 20px;
left: 20px;
}
html :
<div class=video >
<img style=height:200pxsrc=http://san.capitalafrique.com/imatin.net/articles/images/lionel-messi.jpg />
<a href=#></a>
</div>
here is the jsFiddle :
More From » html