特效描述:css3鼠标拖拽 卡片动画特效。css3鼠标拖拽卡片动画特效
代码结构
1. 引入CSS
2. HTML代码
var card,
image,
cardw,
cardh,
cardx,
cardy,
ocardx,
ocardy,
pinx,
piny,
pinxperc,
pinyperc,
targetx,
targety,
rx,
ry,
targetrx,
targetry,
scale,
targetscale,
ww,
wh,
md,
mx,
my,
whoosh,
whooshvol,
whooshvoltarget,
majesty,
majestyvol,
majestyvoltarget,
audioloaded;
function audioload() {
audioloaded++;
if( audioloaded == 2 ) {
document.body.classList.add( 'loaded' );
majesty.play();
whoosh