Picture Magnifier
In general, the mobile phone because the screen is too small, there will be a picture of the problem, so I did a magnifying glass JS effect, support PC and mobile side. Its principle is to use the backgroundsize to achieve, so your browser first to support this property.
Then this component is also an open source Git project, and you can add a workaround for it that does not support backgroundsize. Its git address is: Image magnifier GitHub address https://github.com/tianxiangbing/image-zooming, its online demo address is: JS Picture Magnifier Demo address/HTTP/ Www.lovewebgames.com/jsmodule/image-zooming.html
Image-zooming
Picture Magnifier Example See demo
Examples of Use methods:
or Requirejs.
Properties and Methods Target dom|stringImage objects that need to be enlarged (image only supported)
Times intZoom in multiples, default is twice times
Height:intHeight of Magnifier, default 100px
Width:intWidth of magnifier, default 100px
always boolis always displayed, the default is False, and when you need to zoom in, you can display the magnifying glass when you click on the picture or touch.
Callback:function (A,B,C,D)The magnifying glass moves the callback method, where parameter A is the position object of {x:11,y:11}, B\c is the location object to be positioned, and D is the DOM object of the magnifying glass
[JS Open Source Component development] Image Magnifier