This article mainly introduces jquery's code for implementing the pop-up layer of the Sina Weibo animation effect, which can be closed and dragged, jQuery's response to mouse events and transformation of page element attributes are useful for reference, for more information about jquery, see the following example. Share it with you for your reference. The details are as follows:
This is a jquery pop-up layer with animation implementation. It was first used to simulate the pop-up layer in Sina Weibo. Later, jQuery was introduced and I thought about it. I don't know how to add some animations, then I wrote such a pop-up page Layer Effect. After you click the button, you can see a gradually closed pop-up layer. After you click Close, it gradually disappears, when moving, the absolute position in the upper left corner of the control is calculated based on the mouse position. After the mouse is removed, the movement is stopped and restored to opacity.
The running effect is as follows:
The Online Demo address is as follows:
Http://demo.jb51.net/js/2015/jquery-f-sina-flash-style-close-able-dlg-demo/
The Code is as follows: