gsap+Draggable实现拖拽拼图小游戏代码
代码语言:html
所属分类:游戏
代码描述:gsap+Draggable实现拖拽拼图小游戏代码
代码标签: gsap Draggable 拖拽 拼图 小游戏 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
html,
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
body {
display: flex;
align-items: center;
justify-content: center;
background: #000;
}
.puzzle {
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
}
</style>
</head>
<body translate="no">
<svg class="puzzle" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 285 200">
<rect class="box" width="125" height="100" opacity="0.5" style="mix-blend-mode:overlay" />
<use class="endImg" href="#imgSrc" opacity="0" />
<g class="pieces"></g>
<path d="M24.72 24.61h-9.15c-.61-.04-1.55-.81-1.12-1.46 3.17-2.97 2.37-6.77-2.14-7.11-4.12.09-5.42 4.23-2.27 6.86.65.79-.31 1.8-1.19 1.72-2.95-.03-5.9-.01-8.85-.01V.01h24.75c.04 2.93-.02 5.86-.03 8.79-.01 1.09 1.33 2.39 2.29 1.55 1.62-1.99 4.85-2.65 6 .18 1.79 4.38-2.7 7.76-6.03 3.82-1.23-.86-2.41.89-2.27 2.05.05 2.75 0 5.46.01 8.22Z" />
<path d="M25.07 24.7c-.05-2.99 0-5.99-.03-8.98.11-.61.71-1.35 1.36-1.24 1.48.66 2.57 2.44 4.41 1.95 1.84-.43 3.12-2.47 2.96-4.31-.37-3.95-4.33-5.14-6.9-2.03-.89.66-1.89-.5-1.84-1.43.04-2.87.01-5.75.02-8.62C33.13.03 41.16.06 49.22.02c.46 0 .49.04.49.49 0 2.78-.02 5.56.01 8.34-1.03 4.44-3.83-3.48-7.49.56-2.47 2.4-.63 7.73 3.06 7 1.35-.1.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0