Video Play Icon over image
Place an icon centered on an image, using screen reader text for accessibility. (Bootstrap)
HTML
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<div class="container">
<div class="row">
<div class="video-overlay col-sm-4 col-xs-6"> <a href="#">
<img src="http://placehold.it/600x450/face8d" />
<div class="icon"><div class="sr-only">Play</div></div>
</a>
</div>
</div>
</div>
CSS
img {
max-width: 100%;
height: auto;
}
.video-overlay .icon {
position: absolute;
background-image: url('http://placehold.it/100x100/f00');
margin: 0 auto;
background-size: contain;
width: 20%;
height: 100px;
bottom: 35%;
left: 40%;
background-repeat: no-repeat;
background-position: bottom;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active, .sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}