gsap实现3d图文卡片堆叠点击轮换幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述:gsap实现3d图文卡片堆叠点击轮换幻灯片效果代码
代码标签: gsap 3d 图文 卡片 堆叠 点击 轮换 幻灯片
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
p,
a {
text-decoration: none;
font-weight: 500;
font-size: 14px;
color: #000;
}
.container {
position: relative;
width: 100%;
height: 100vh;
overflow: hidden;
background-color: #dfe1c8;
}
.slider {
position: absolute;
top: 15vh;
width: 100vw;
height: 100vh;
overflow: hidden;
perspective: 300px;
perspective-origin: 50% 50%;
}
.card {
position: absolute;
top: 35%;
left: 50%;
width: 50%;
height: 400px;
border-radius: 10px;
overflow: hidden;
transform: translate3d(-50%, -50%, 0);
background-color: #000;
}
@media (max-width: 500px) {
.slider {
top: 27vh;
}
.card {
height: 300px;
}
}
.card img {
position: absolute;
opacity: 0.75;
}
.copy {
position: absolute;
top: 40%;
left: 50%;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0