滚动图片倾斜进入视觉效果代码
代码语言:html
所属分类:视觉差异
代码描述:滚动图片倾斜进入视觉效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Righteous&display=swap");
*,
*::after,
*::before {
box-sizing: border-box;
}
:root {
font-size: 16px;
}
body {
margin: 0;
--color-text: #dc6e25;
--color-bg: #efded3;
--color-link: #000;
--color-link-hover: #dc6e25;
--aspect-ratio: 1/1.5;
--imgwidthmax: 500px;
--size-title: 10rem;
--font-weight-title: 400;
color: var(--color-text);
background-color: var(--color-bg);
font-family: turquoise, serif;
font-size: 1.5rem;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.scroll {
--color-text: #905348;
--color-bg: #120605;
--color-link: #8f8f76;
--color-link-hover: #fff;
font-size: 1rem;
--imgwidthmax: 400px;
--color-description: #7e605b;
--font-title: ivymode;
--size-title: 6vw;
--imgwidthmax: 600px;
}
a {
text-decoration: none;
color: var(--color-link);
outline: none;
}
a:hover,
a:focus {
color: var(--color-link-hover);
outline: none;
}
.page {
display: grid;
padding: 5vw;
max-width: 1200px;
margin: 0 auto;
grid-template-columns: 100%;
grid-template-areas: "header" "grid";
will-change: transform;
}
.page__title {
grid-area: header;
margin: 0 0 0.5rem;
font-family: "Righteous", cursive;
font-size: var(--size-title);
font-weight: 400;
}
.arrow {
width: 60px;
height: 80px;
position: absolute;
top: 1%;
right: 5%;
z-index: 999;
}
.arrow path {
stroke: var(--color-text);
stroke-width: 2px;
fill: transparent;
animation: down 2s infinite;
}
@keyframes down {
0% {
opacity: 0;
}
25% {
opacity: 1;
}
75% {
opacity: 0;
}
100% {
opacity: 0;
}
}
.arrow path.a1 {
animation-delay: -1s;
}
.arrow path.a2 {
animation-delay: -0.5s;
}
.arrow path.a3 {
animation-delay: 0s;
}
.content {
grid-area: grid;
margin: 25vh 0 30vh;
}
.content--padded {
padding: 0 10vw;
}
.content__item {
--imgwidth: calc(var(--imgwidthmax) * var(--aspect.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0