Resize image with JavaScript

2

Would you like to build with JavaScript an image-manipulation interface similar to Word, which has the option of enlarging the image or reducing it with the mouse?

    
asked by anonymous 20.07.2017 / 22:33

1 answer

3

It is very laborious to do this manually. There is a CSS property that resolves this, but only allows you to pull the image up the bottom right corner, and still has limited support >. But it's interesting:

div {
  width: 200px;
  resize: both;
  overflow: auto;
}

img {
  width: 100%;
}
<div>
  <img src="https://tctechcrunch2011.files.wordpress.com/2015/04/codecode.jpg?w=738"></div><p>Puxeocantoinferiordireitodaimagem</p>

Toensurefullsupportandmorefunctionality,only building on hand or using a library .

    
20.07.2017 / 23:07