我对容器与标题重叠的原因有任何想法吗?

时间:2018-06-09 05:21:54

标签: html html5 bootstrap-4

我想弄清楚为什么我的容器在小屏幕部分与我的标题重叠。我的目标是将容器(及其内部的所有内容)放在页面上的标题下面。它适用于超小屏幕部分,但小屏幕是一切都出错的地方。我刚刚开始我的自助旅程,所以请忽略我的草率代码。

 <!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link href="https://fonts.googleapis.com/css?family=Abel" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Anton" rel="stylesheet">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
    <link rel="stylesheet" href="css/grid-system-test.css">
</head>
<body>
<header>
    <div class="d-sm-none">   <!-- Navbar is only viewable on extra small screens -->
        <div class="white-block">
            <img class="comp-logo mx-auto d-block" src="img/logo.png" alt="company logo">
        </div>
        <nav class="text-center">
            <div class="col-12">
                <h2 class="thin-font">codeup design</h2>
            </div>
            <div class="col-12">
                <ul class="nav xs-nav">
                    <li class="nav-item">
                        <a class="nav-link" href="#"><p>SERVICES</p></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#"><p>WORK</p></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#"><p>BLOG</p></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#"><p>CONTACT</p></a>
                    </li>
                </ul>
            </div>
        </nav>
    </div>
    <div class="d-none d-sm-block"> <!------------------------ NAVBAR FOR SMALL SCREEN STARTS HERE -------------------------->
        <nav class="white-bg text-center small-nav">

            <ul class="nav justify-content-center">
                <li class="small-nav-item">
                    <a class="small-nav-link" href="#">SERVICE</a>
                </li>
                <li class="small-nav-item">
                    <a class="small-nav-link" href="#">WORK</a>
                </li>
                <li class="small-nav-item">
                    <a class="small-nav-link" href="#"><img class="comp-logo comp-logo-small" src="img/logo.png"></a>
                </li>

                <li class="small-nav-item">
                    <a class="small-nav-link" href="#">BLOG</a>
                </li>
                <li class="small-nav-item">
                    <a class="small-nav-link" href="#">CONTACT</a>
                </li>
            </ul>
            <div class="col-12">
                <h2 class="thin-font">codeup design</h2>
            </div>
        </nav>
    </div>
</header>


<!-------------------------------------------- CONTAINER STARTS HERE -------------------------------------------------->

    <div class="container-fluid text-center">
        <h2>VISUAL DESIGN & WEB DEVELOPMENT</h2>
        <h4 class="park-city-text">FROM PARK CITY, UTAH</h4>

        <div class="row">
            <div class="col-6">
                <div class="circle-big red-bg ml-4">
                    <h6 class="text-light center-txt">DESIGN</h6>
                </div>
            </div>
            <div class="col-6">
                <div class="circle-big orange-bg mr-4">
                    <h6 class="text-light center-txt">DEVELOP</h6>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-6">
                <div class="circle-big green-bg ml-4 circle-margin-top">
                    <h6 class="text-light center-txt">SUPPORT</h6>
                </div>
            </div>
            <div class="col-6">
                <div class="circle-big blue-bg mr-3 circle-margin-top">
                    <h6 class="text-light center-txt">HOST</h6>
                </div>
            </div>
        </div>
        <!-- end of circle images -->

        <p class="selectW">SELECTED WORK</p>
        <img class="ipad rounded" src="img/apple-ipad.jpg" alt="apple on ipad">
        <div class="row">
            <div class="col-6">
                <p class="float-left ml-3">FEATURED PROJECT</p>
            </div>
            <div class="col-6">
                <div class="circle-sm red-bg small-circle-text float-right mr-2"><p class="font-weight-bold">D</p></div>
                <div class="circle-sm orange-bg small-circle-text float-right mr-2"><p class="font-weight-bold">D</p></div>
                <div class="circle-sm green-bg small-circle-text float-right mr-2"><p class="font-weight-bold">S</p></div>
                <div class="circle-sm blue-bg small-circle-text float-right mr-2"><p class="font-weight-bold">H</p></div>
            </div>
        </div>
    </div>
</body>
</html>

0 个答案:

没有答案