gsap+ScrollTrigger实现层叠立体图片轮播幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述:gsap+ScrollTrigger实现层叠立体图片轮播幻灯片效果代码,滚动鼠标滚动也能驱动。
代码标签: gsap ScrollTrigger 层叠 立体 图片 轮播 幻灯片
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
box-sizing: border-box;
}
body {
background: #222;
min-height: 100vh;
padding: 0;
margin: 0;
}
.gallery {
position: absolute;
width: 100%;
height: 100vh;
overflow: hidden;
}
.cards {
position: absolute;
width: 14rem;
height: 18rem;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
.cards li {
list-style: none;
padding: 0;
margin: 0;
width: 14rem;
height: 18rem;
text-align: center;
line-height: 18rem;
font-size: 2rem;
font-family: sans-serif;
border: 8px solid white;
position: absolute;
top: 0;
left: 0;
background-size: cover;
}
.cards li:nth-of-type(1) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/626903b0b64e2.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(2) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/627ef04e2d970.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(3) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/62842707b1cc9.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(4) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/628427c4ca32c.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(5) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/6284286d59cbd.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(6) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/62842812c0d7e.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(7) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/6284309a1b4e3.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(8) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/6284325120d66.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:nth-of-type(9) {
background-image: url(//repo.bfw.wiki/bfwrepo/image/6284337bbaf11.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_250,h_335,/quality,q_90);
}
.cards li:n.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0