视频背景全屏落地页唯美森林背景效果

代码语言:html

所属分类:多媒体

代码描述:视频背景全屏落地页唯美森林背景效果

代码标签: 落地 唯美 森林 背景 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <style>
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400&display=swap');

:root {
        --primary-color: #3a4052;
    }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Open Sans', sans-serif;
            line-height: 1.5;
        }

        a {
            text-decoration: none;
            color: var(--primary-color);
        }

        h1 {
            font-weight: 300;
            font-size: 60px;
            line-height: 1.2;
            margin-bottom: 15px;
        }

        .showcase {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: #fff;
            padding: 0 20px;
        }

        .video-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
         
        }

        .video-container video {
            min-width: 100%;
            min-height: 100%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            object-fit: cover;
        }

        .video-container:after {
            content: '';
            z-index: 1;
            height: 100%;
            width: 100%;
            top: 0;
            left: 0;
            background: rgba(0, 0, 0, 0.5);
            position: absolute;
        }

        .content {
            z-index: 2;
        }

        .btn {
          .........完整代码请登录后点击上方下载按钮下载查看

网友评论0