How to Crop Image in CSS?

by muthu 2014-07-24 12:10:33

How to Crop Image in CSS?

Original Image

crop_image

Croped Image

croped image
<style type="text/css">
.crop { float:left; margin:.5em 10px .5em 0; overflow:hidden; border:1px solid #ccc; }
.crop img { margin:-20px -15px -40px -55px; }
</style>

<p class="crop">
<a href="#" title="Crop">
<img src="img.jpg" alt="css template">
</a>
</p>
945
like
0
dislike
0
mail
flag

You must LOGIN to add comments