ScrollTrigger滚动触发动画效果
代码语言:html
所属分类:加载滚动
代码描述:ScrollTrigger滚动触发动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/all.min.css">
<style>
@import url("https://fonts.googleapis.com/css2?family=Lato&family=Raleway&display=swap");
:root {
--color: #fff;
--color2: #000;
--greenSock: #88ce02;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
height: 100%;
}
body {
height: 100%;
min-height: 100%;
margin: 0;
color: black;
font-family: 'Lato', sans-serif;
background: skyblue;
}
a {
text-decoration: none;
cursor: pointer;
}
img {
max-width: 100%;
}
ul {
list-style: none;
}
h1 {
color: black;
font-size: 3rem;
}
h1,
h2 {
font-family: 'Raleway', sans-serif;
}
span {
display: inline-block;
color: white;
}
main {
position: relative;
}
main .bgImg {
width: 100%;
position: fixed;
top: 200px;
left: 15%;
opacity: 0;
z-index: -420;
}
@media (max-width: 420px) {
main .bgImg {
min-width: 125%;
top: 50px;
left: 0;
}
}
.center {
text-align: center;
}
.scrollMe {
height: 100vh;
}
.grid {
display: grid;
grid-template-columns: 1fr;
justify-content: center;
justify-items: center;
align-content: center;
align-items: center;
text-align: center;
}
.fauxView, #viewBox {
will-change: transform;
}
.fauxView {
width: 305px;
height: 500px;
overflow-x: hidden;
overflow-y: hidden;
scrollbar-width: none;
-ms-overflow-style: none;
-webkit-appearance: n.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0