luxy实现视觉差异滚动效果代码
代码语言:html
所属分类:视觉差异
代码描述:luxy实现视觉差异滚动效果代码
下面为部分代码预览,完整代码请点击下载或在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.css">
<style>
body {
line-height: 1.6;
font-size: 1.1rem;
display: flex;
justify-content: center;
}
.content {
max-width: 40rem;
margin: 0 auto;
}
.section {
position: relative;
overflow: hidden;
height: 100vh;
display: flex;
align-items: center;
}
.section .content {
position: relative;
z-index: 1;
padding: 2rem;
color: white;
}
.image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 120vh;
background: #eee;
}
.image::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: inherit;
height: inherit;
background-color: rgba(0, 0, 0, 0.5);
z-index: 0;
}
.image img {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div class="contai.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0