Crop images | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Crop images

Can u please tell how to crop images using html and give as out put

10th Feb 2019, 7:17 PM
Shining Star💥
Shining Star💥 - avatar
1 ответ
+ 2
You can use negative margin to move the image around within the <div/>. <div class="crop"> <img src="..." alt="..."> </div> CSS: .crop { width: 200px; height: 150px; overflow: hidden; } .crop img { width: 400px; height: 300px; margin: -75px 0 0 -100px; }
11th Feb 2019, 1:09 PM
Tejas Gupta