scroll-timeline实现滚动多屏页面图文飞入动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:scroll-timeline实现滚动多屏页面图文飞入动画效果代码
代码标签: scroll-timeline 滚动 多屏 页面 图文 飞入 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.5.0.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/open-props.normalize.min.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/open-props.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@900&display=swap');
*,
*:after,
*:before {
box-sizing: border-box;
}
body {
min-height: 100vh;
font-family: 'Inter', sans-serif, system-ui;
background: var(--surface-2);
display: grid;
justify-items: center;
align-content: start;
overflow-x: hidden;
}
:root {
--content: 66ch;
--gutter: 1rem;
--gap: 0rem;
}
header, main {
width: var(--content);
max-width: calc(100vw - (2 * var(--gutter)));
margin: 0 auto;
}
footer {
padding: 2rem;
font-size: 0.875rem;
}
header {
min-height: 100vh;
display: grid;
align-content: center;
}
h1 {
font-weight: 900;
font-family: impact;
font-size: calc(var(--font-size-fluid-3) * 2.5);
line-height: 1;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
header {
position: relative;
}
header img {
position: absolute;
left: 25%;
top: 15%;
z-index: 1;
opacity: 0.65;
filter: saturate(0.5);
-webkit-clip-path: polygon(0 15%, 75% 0, 100% 32%, 80% 100%, 0 67%);
clip-path: polygon(0 15%, 75% 0, 100% 32%, 80% 100%, 0 67%);
}
h1 {
z-index: 2;
position: relative;
}
h1 span:nth-of-type(2) {
color: transparent;
-webkit-text-stroke: 0.25re.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0