How to simulate magnifying glass on Web-page image (Javascript)?

前端 未结 6 2008
一整个雨季
一整个雨季 2020-12-05 11:16

Google has the coolest effects - once it was a Pac-man game, today is apparently the 160th anniversary of the first World Fair, and Google\'s logo has an image of i

6条回答
  •  死守一世寂寞
    2020-12-05 11:34

    Looks like they're using two images, one for the logo and one for the zoom (the zoomed one is actually sliced, to run the animations separately...?) They probably detect if the mouse is over the normal logo, then show the yellow circle and attach it to the mouse position. Then showing the other image, shifting it opposite of the mouse. Or something similar.

提交回复
热议问题