Good morning!
I want to cut the sides of a photo without distorting it, is it possible?
For example, I have this image here:
<img src="https://i.stack.imgur.com/4oeoT.jpg"name="Foto Teste" alt="Foto Teste"/>
She has 1200x1200
I wanted to take, let's suppose, 400px from the sides (200 on each side), or, I want it to be 800 x 1200
But, I do not want to distort image or decrease, I want to keep the same thing without 200px on each side. Is this possible?
Illustration:
.imagem
{
width: 400px;
height: 400px;
background: red;
border: 2px solid;
display: flex;
justify-content: center;
align-items: center;
}
.imagem-menor
{
background: #95d6e0;
width: 300px;
height: 400px;
}
<div class="imagem">
<div class="imagem-menor"></div>
</div>
In this case, the red part is the one I want to remove, the middle one leave, but without distorting anything.