js+css实现视频视觉差异滚动网页特效代码
代码语言:html
所属分类:视觉差异
代码描述:js+css实现视频视觉差异滚动网页特效代码
代码标签: js css 视频 视觉 差异 滚动 网页 特效 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>视差滚动网页</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
overflow-x: hidden;
background-color: #000;
color: #fff;
}
/* 视差容器 */
.parallax-section {
position: relative;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
/* 视频视差效果 */
.video-parallax {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: 1;
transition: transform 0.5s ease-out;
}
.parallax-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index: 2;
}
.parallax-content {
position: relative;
z-index: 3;
text-align: center;
padding: 20px;
}
.parallax-content h1 {
font-size: 4rem;
margin-bottom: 20px;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
animation: fadeInUp 1s ease-out;
}
.parallax-content p {
font-size: 1.5rem;
text-shadow: 1p.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0