0

I would like to crop and then non-proportionally stretch an image to fill the entire page. I suppose this is doable with just CSS and a proper DOM structure. I don't insist on the CSS solution. Even client-side JavaScript works for me, as long as I can download the full-size image from the server.

enter image description here

Any help will be appreciated!

Jan

janper
  • 31
  • 6

1 Answers1

0

You can use CSS clip-path

.clip-me {
  clip-path: inset(10px 20px 0px 0px);
  -webkit-clip-path: polygon(10% 10%, 10% 10%, 10% 10%);
}
<img class="clip-me" src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.png">

This tool is pretty useful also.

Nick
  • 729
  • 8
  • 18