Crop image
<img
...
style="width: 300px; height: 337px; object-fit: cover;"
...
/>
Crop image
<img
...
style="width: 300px; height: 337px; object-fit: cover;"
...
/>
how to crop an image in html
<head>
<style>
.crop {
width: 200px;
height: 150px;
overflow: hidden;
}
.crop img {
width: 400px;
height: 300px;
margin: -75px 0 0 -100px;
}
</style>
</head>
<body>
<!-- This is an image that exists online -->
<div class="crop">
<img src="https://i.stack.imgur.com/wPh0S.jpg" alt="Donald Duck">
</div>
</body>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us