The solution is to overlay the image element on another image element using the absolute position and clipping ( http://codepen.io/anon/pen/jqpwgV ).
HTML:
<img src="img.jpg" id="image-overlay" /> <img src="img.jpg" id="image" />
CSS
#image-overlay{position:absolute;clip: rect(0px,498px,374px,100px);} #image{opacity:0.5;}
If you want to be prepared for the future. Use a clip path with graceful degradation in CSS. See the code below (or http://codepen.io/anon/pen/zqLdxW ).
#image-overlay{position:absolute; clip: rect(0px,498px,374px,100px); -webkit-clip-path: inset(0px 0px 0px 100px); clip-path: inset(0px 0px 0px 100px); } #image{opacity:0.5;}
source share