自适应恐龙引导页面

代码语言:html

所属分类:布局界面

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
@import url("https://fonts.googleapis.com/css?family=Anton|Overpass+Mono:600&display=swap");
        /* Variables */
        /* Mixins and functions */
        /* Reset */
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Helvetica, sans-serif;
        }

        img {
            max-width: 100%;
            display: block;
            width: 100%;
            height: auto;
        }

        ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        /* Typography */
        body {
            font-family: "Overpass Mono", monospace;
        }

        h1,
        h2,
        h3 {
            font-family: "Anton", sans-serif;
            font-weight: 400;
            text-transform: uppercase;
            line-height: 1;
        }

        h1 {
            font-size: 3rem;
        }
@media (min-width: 40em) {
            h1 {
                font-size: 5rem;
            }
        }
@media (min-width: 60em) {
            h1 {
                font-size: 6.875rem;
            }
        }

        h2 {
            font-size: 1.875rem;
            letter-spacing: 0.03em;
            margin: 0;
        }
@media (min-width: 40em) {
            h2 {
                font-size: 3.75rem;
            }
        }
@media (min-width: 60em) {
            h2 {
                font-size: 5.5rem;
            }
        }

        a {
            color: inherit;
        }

        /* Header */
        .page-header {
            position: fixed;
            z-index: 2;
            width: 100%;
        }

        /* Scroll behaviour */
@media (min-height: 30em) {
            main {
                scroll-snap-type: y mandatory;
                height: 100vh;
                overflow-y: scroll;
            }
        }

        /* Nav */
        .nav__list {
            display: flex;
            height: 5rem;
            align-items: center;
            justify-content: flex-end;
            padding: 0.625rem 1.25rem;
        }

        .nav__item a {
            color: white;
            display: block;
            text-decoration: none;
            padding: 0.75rem 1.25rem;
        }
        .nav__item a:hover, .nav__item a:focus {
            text-decoration: underline;
        }

        .nav__item--cta {
            margin-left: 1.25rem;
        }
        .nav__item--cta a {
            f.........完整代码请登录后点击上方下载按钮下载查看

网友评论0