说明
只用做开发中记录,不喜勿喷,谢谢。
直接上效果图,可配置移动速度(代码中为2s,具体效果以运行为主)。
demo
源码
<template>
<div id="container">
<button class="moveBox" @click="moveBox">Move 动起来</button>
<div
class="wrapper"
:style="{
'animation-name': 'flyableBox' + currentStep,
left: currentPos.left + 'px',
top: currentPos.top + 'px',
}"
>
<img class="icon" :src="url" alt="" />
</div>
</div>
</template>
<script</