HTML & CSS

7 styles Responsive Navbar. ep 02

7 styles Responsive Navbar with Bootstrap 4, HTML5 & CSS3

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Meeny.com</title>
    <!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> -->
    <link rel="stylesheet" href="main.css">
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
</head>
<body>

    
<!-- NavBar Style 1     -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="#"><img src="images/symbol.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
        <li class="nav-item active">
            <a class="nav-link" href="#">About Us <span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="#">Business</a>
        </li>
        <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            Products
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
            <a class="dropdown-item" href="#">Category 1</a>
            <a class="dropdown-item" href="#">Category 2</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#">Category 3</a>
            <a class="dropdown-item" href="#">Category 4</a>
            </div>
        </li>
        <li class="nav-item">
            <a class="nav-link" href="#">Contact Us</a>
            </li>
            <li class="nav-item">
            <a class="nav-link" href="#">Investing</a>
            </li>
            <li class="nav-item">
            <a class="nav-link" href="#">Press</a>
            </li>
        </ul>
        <form class="form-inline my-2 my-lg-0">
        <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
        </form>
    </div>
</nav>

<!-- NavBar Style 2     -->
<div class="navbarwrap bg-primary">
    <div class="container">
        
        <nav class="navbar navbar-expand-lg navbar-dark">
            <a class="navbar-brand" href="#"><img src="images/symbol_w.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav ml-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">About Us <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Business</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    Products
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="#">Category 1</a>
                    <a class="dropdown-item" href="#">Category 2</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#">Category 3</a>
                    <a class="dropdown-item" href="#">Category 4</a>
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Contact Us</a>
                    </li>
                    <li class="nav-item">
                    <a class="nav-link" href="#">Investing</a>
                    </li>
                    <li class="nav-item">
                    <a class="nav-link" href="#">Press</a>
                    </li>
                </ul>

            </div>
        </nav>
        
    </div>
</div>


<!-- NavBar Style 3     -->
<div class="navbarwrap bg-white">
    <div class="container">
        
        <nav class="navbar navbar-expand-lg navbar-light">
            <a class="navbar-brand" href="#"><img src="images/symbol.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav m-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">About Us <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Business</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    Products
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="#">Category 1</a>
                    <a class="dropdown-item" href="#">Category 2</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#">Category 3</a>
                    <a class="dropdown-item" href="#">Category 4</a>
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Contact Us</a>
                    </li>
                    <li class="nav-item">
                    <a class="nav-link" href="#">Investing</a>
                    </li>
                    <li class="nav-item">
                    <a class="nav-link" href="#">Press</a>
                    </li>
                </ul>
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a href="" class="nav-link"><i class="fab fa-twitter"></i></a>
                    </li>
                    <li class="nav-item">
                        <a href="" class="nav-link"><i class="fab fa-google-plus-g"></i></a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fas fa-user"></i>
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                          <a class="dropdown-item" href="#">Join</a>
                          <a class="dropdown-item" href="#">Sign-in</a>
                        </div>
                      </li>
                </ul>
            </div>
        </nav>
        
    </div>
</div>




<!-- NavBar Style 4     -->
<div class="navbarwrap bg-success p-2 sticky-top">
    <div class="container">
        
        <nav class="navbar navbar-expand-lg navbar-dark">
            <a class="navbar-brand d-md-block d-lg-none" href="#"><img src="images/symbol_w.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">About Us <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Business</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    Products
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="#">Category 1</a>
                    <a class="dropdown-item" href="#">Category 2</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#">Category 3</a>
                    <a class="dropdown-item" href="#">Category 4</a>
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Contact Us</a>
                    </li>
                </ul>
                <a class="navbar-brand d-md-none d-lg-block" href="#"><img src="images/symbol_w.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">Investing</a>
                        </li>
                        <li class="nav-item">
                        <a class="nav-link" href="#">Press</a>
                        </li>
                    <li class="nav-item">
                        <a href="" class="nav-link"><i class="fab fa-twitter"></i></a>
                    </li>
                    <li class="nav-item">
                        <a href="" class="nav-link"><i class="fab fa-google-plus-g"></i></a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fas fa-user"></i>
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                          <a class="dropdown-item" href="#">Join</a>
                          <a class="dropdown-item" href="#">Sign-in</a>
                        </div>
                      </li>
                </ul>
            </div>
        </nav>
        
    </div>
</div>




<!-- NavBar Style 5     -->
<div class="navbarwrap bg-white p-2">
    <div class="container text-center">
        <div class="d-none d-lg-block mt-3">
            <span class="navbar-text float-left"><small>Slogan-left</small></span>
            <a class="navbar-brand" href="#"><img src="images/symbol.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
            <span class="navbar-text float-right"><small>Slogan-right</small></span>
        </div>
        <nav class="navbar navbar-expand-lg navbar-light">
            <a class="navbar-brand d-lg-none d-md-block" href="#"><img src="images/symbol.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarSupportedContent">
             <ul class="navbar-nav m-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">About Us <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Business</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    Products
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="#">Category 1</a>
                    <a class="dropdown-item" href="#">Category 2</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#">Category 3</a>
                    <a class="dropdown-item" href="#">Category 4</a>
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">Contact Us</a>
                    </li>

                    <li class="nav-item">
                        <a class="nav-link" href="#">Investing</a>
                        </li>
                        <li class="nav-item">
                        <a class="nav-link" href="#">Press</a>
                        </li>
                    <li class="nav-item">
                        <a href="" class="nav-link"><i class="fab fa-twitter"></i></a>
                    </li>
                    <li class="nav-item">
                        <a href="" class="nav-link"><i class="fab fa-google-plus-g"></i></a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fas fa-user"></i>
                        </a>
                        <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                          <a class="dropdown-item" href="#">Join</a>
                          <a class="dropdown-item" href="#">Sign-in</a>
                        </div>
                      </li>
                </ul>
            </div>
        </nav>
        
    </div>
</div>




<!-- NavBar Style 6     -->
<div class="navbarwrap bg-danger p-4">
    <div class="container">
        
        <nav class="navbar navbar-expand-lg navbar-dark">
            <a class="navbar-brand" href="#"><img src="images/symbol_w.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav ml-auto">
                <li class="nav-item active">
                    <a class="nav-link btn btn-danger" href="#">About Us <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link btn btn-danger" href="#">Business</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link btn btn-danger dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    Products
                    </a>
                    <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="#">Category 1</a>
                    <a class="dropdown-item" href="#">Category 2</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#">Category 3</a>
                    <a class="dropdown-item" href="#">Category 4</a>
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link btn btn-danger" href="#">Contact Us</a>
                    </li>
                    <li class="nav-item">
                    <a class="nav-link btn btn-danger" href="#">Investing</a>
                    </li>
                    <li class="nav-item">
                    <a class="nav-link btn btn-danger" href="#">Press</a>
                    </li>
                </ul>

            </div>
        </nav>
        
    </div>

</div>



 

<!-- NavBar Style 6     -->
<nav class="navbar navbar-light navbar-expand bg-warning justify-content-between">
    <div class="container-fluid">
        <ul class="navbar-nav">
            <li class="nav-item text-center">
                <a href="" class="nav-link"><span class="fa fa-map"></span>
                <span class="d-none d-sm-inline d-xl-block px-1">Map</span>
                </a>
            </li>
            <li class="nav-item text-center">
                <a href="" class="nav-link"><span class="fa fa-list"></span>
                <span class="d-none d-sm-inline d-xl-block px-1">List</span>
                </a>
            </li>
        </ul>
        <a class="navbar-brand" href="#"><img src="images/symbol.svg" height="24px"> <span class="font-weight-bold">Meeny</span>.com</a>
        <ul class="navbar-nav">
            <li class="nav-item text-center">
                <a href="" class="nav-link"><span class="fa fa-user"></span>
                <span class="d-none d-sm-inline d-xl-block px-1">Sign-up</span>
                </a>
            </li>
            <li class="nav-item text-center">
                <a href="" class="nav-link"><span class="fa fa-user"></span>
                <span class="d-none d-sm-inline d-xl-block px-1">Log-in</span>
                </a>
            </li>
        </ul>    
    </div>
    
</nav>





<div class="container">
    <div class="jumbotron mt-3">
        <h1 class="display-4">Hello, world!</h1>
        <p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
        <hr class="my-4">
        <p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
        <a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
      </div>
    <div>
        <div class="row row-cols-3 text-center">
            <div class="p-4 bg-primary">primary</div>
            <div class="p-4 bg-secondary">secondary</div>
            <div class="p-4 bg-success">success</div>
            <div class="p-4 bg-danger">danger</div>
            <div class="p-4 bg-warning">warning</div>
            <div class="p-4 bg-info">info</div>
        </div>
    </div>
    
    
    <p class="text-primary">.text-primary</p>
    <p class="text-secondary">.text-secondary</p>
    <p class="text-success">.text-success</p>
    <p class="text-danger">.text-danger</p>
    <p class="text-warning">.text-warning</p>
    <p class="text-info">.text-info</p>
    <p class="text-light bg-dark">.text-light</p>
    <p class="text-dark">.text-dark</p>
    <p class="text-body">.text-body</p>
    <p class="text-muted">.text-muted</p>
    <p class="text-white bg-dark">.text-white</p>
    <p class="text-black-50">.text-black-50</p>
    <p class="text-white-50 bg-dark">.text-white-50</p>
    
    <p><a href="#" class="text-primary">Primary link</a></p>
    <p><a href="#" class="text-secondary">Secondary link</a></p>
    <p><a href="#" class="text-success">Success link</a></p>
    <p><a href="#" class="text-danger">Danger link</a></p>
    <p><a href="#" class="text-warning">Warning link</a></p>
    <p><a href="#" class="text-info">Info link</a></p>
    <p><a href="#" class="text-light bg-dark">Light link</a></p>
    <p><a href="#" class="text-dark">Dark link</a></p>
    <p><a href="#" class="text-muted">Muted link</a></p>
    <p><a href="#" class="text-white bg-dark">White link</a></p>
    
    <div class="p-3 mb-2 bg-primary text-white">.bg-primary</div>
    <div class="p-3 mb-2 bg-secondary text-white">.bg-secondary</div>
    <div class="p-3 mb-2 bg-success text-white">.bg-success</div>
    <div class="p-3 mb-2 bg-danger text-white">.bg-danger</div>
    <div class="p-3 mb-2 bg-warning text-dark">.bg-warning</div>
    <div class="p-3 mb-2 bg-info text-white">.bg-info</div>
    <div class="p-3 mb-2 bg-light text-dark">.bg-light</div>
    <div class="p-3 mb-2 bg-dark text-white">.bg-dark</div>
    <div class="p-3 mb-2 bg-white text-dark">.bg-white</div>
    <div class="p-3 mb-2 bg-transparent text-dark">.bg-transparent</div>
    
    
    
</div>


<img src="images/n1.png" alt="" class="img-fluid">
<img src="images/n2.png" alt="" class="img-fluid">







</body>
</html>

main.scss

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&display=swap');

$font-family-base: 'Roboto', sans-serif;
$enable-responsive-font-sizes:                true;


$color-1 : #0F4C81;
$color-2 : darken($color-1,10%);
$color-3 : darken($color-1,15%);
$color-4 : darken($color-1,20%);
$color-5 : darken($color-1,25%);
$color-6 : darken($color-1,30%);

$color-1 : #0F4C81;
$color-2 : lighten($color-1,10%);
$color-3 : lighten($color-1,15%);
$color-4 : lighten($color-1,20%);
$color-5 : lighten($color-1,25%);
$color-6 : lighten($color-1,30%);




$color-1 : #f72585;
$color-2 : #7209b7;
$color-3 : #3a0ca3;
$color-4 : #4361ee;
$color-5 : #4cc9f0;
$color-6 : #237a94;




$primary:       $color-1;
$secondary:     $color-2;
$success:       $color-3;
$info:          $color-4;
$warning:       $color-5;
$danger:        $color-6;


// $light:         $gray-100 !default;
// $dark:          $gray-800 !default;


@import "scss/bootstrap";


html{
    font-size: 15.25px;
    letter-spacing: -0.02em;
    word-spacing: 0.05em;
}

7 styles Responsive Navbar. ep 02”에 대한 54개의 생각