1
I am trying to apply a "mask" to my image, to take only the center of it and apply 50px
for 52px
, tried to use the clip-path
but it doesn’t work, I’m using the opera and the Chrome for testing, follow my code:
CSS
.img_tamanho_icon
{
width: 50px;
height: 55px;
clip-path: inset(52px 50px 52px 50px);
-webkit-clip-path:inset(52px 50px 52px 50px);
display: block;
overflow: hidden;
}
HTML
<img src="minhaImg.jpg" class="img_tamanho_icon">
How could I do this? Without losing image resolution, for example "stretch" the same
Property support
clip-path
: http://caniuse.com/#feat=css-clip-path– Renan Gomes
What is the desired effect? It would be nice to better describe and post an example image, as there are often more suitable tools to solve the problem. Careful not to fall in the XY problem.
– Bacco