gsap实现三维立体相册拖拽旋转木马效果代码
代码语言:html
所属分类:画廊相册
代码描述:gsap实现三维立体相册拖拽旋转木马效果代码,图片可换,拖拽就会旋转,像风车一样。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
line-height: 2;
font-family: Untitled, sans-serif;
text-transform: uppercase;
color: #333;
font-size: 14px;
}
.spacer {
height: 20vh;
z-index: 0;
text-align: center;
}
.intro {
display: grid;
place-content: center;
}
@-webkit-keyframes bounce {
from {
transform: translateY(-10%);
}
to {
transform: translateY(10%);
}
}
@keyframes bounce {
from {
transform: translateY(-10%);
}
to {
transform: translateY(10%);
}
}
.intro svg {
width: 86px;
}
.intro span {
display: inline-block;
-webkit-animation: bounce 1s alternate infinite ease-in-out;
animation: bounce 1s alternate infinite ease-in-out;
}
.container {
overflow: hidden;
width: 100%;
}
.wrapper {
z-index: 1;
perspective: 1800px;
perspective-origin: center -300px;
transform-style: preserve-3d;
position: relative;
min-height: 100vh;
width: 100%;
pointer-events: none;
display: grid;
place-content: cente.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0