cardSpreadPosition实现滚动卡片堆叠位移动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:cardSpreadPosition实现滚动卡片堆叠位移动画效果代码,结合了scroll-timeline.js插件。
代码标签: cardSpreadPosition 滚动 卡片 堆叠 位移 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Asap&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
overscroll-behavior-x: none;
overscroll-behavior-y: none;
scroll-behavior: smooth;
}
body {
font-family: "Asap", sans-serif;
position: relative;
width: 100%;
min-height: 100vh;
text-align: center;
overflow-x: clip;
color: gray;
display: grid;
place-items: center;
}
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background: linear-gradient(
135deg,
rgba(222, 191, 244, 1) 0%,
rgba(255, 178, 178, 1) 100%
);
}
main {
width: 100%;
max-width: 100vw;
display: grid;
place-items: center;
}
#gallery {
--size: 200px;
--gap: 10px;
--space: 10px;
position: relative;
width: min(100%, 1000px);
overflow-x: visible;
d.........完整代码请登录后点击上方下载按钮下载查看
网友评论0