WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Bootstrap 4 - Jumbotron


Jumbotron allow multiple buttons to be stacked together on a single line.

Basic Jumbotron

You can create the basic Jumbotron by using .btn-group class inside <div> element as shown in the below example −

Example

<html lang = "en">
    <head>
        <!-- Meta tags -->
        <meta charset = "utf-8">
        <meta name = "viewport" content = "width = device-width, initial-scale = 1, shrink-to-fit = no">

        <!-- Bootstrap CSS -->
        <link rel = "stylesheet"
            href = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
            integrity = "sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
            crossorigin = "anonymous">

        <title>Bootstrap 4 Example</title>
    </head>

    <body>
        <div class = "container">
            <h2>Jumbotron</h2>
            <div class = "btn-group">
                <button type = "button" class = "btn btn-info">Google</button>
                <button type = "button" class = "btn btn-info">Yahoo</button>
                <button type = "button" class = "btn btn-info">Facebook</button>
            </div>
        </div>

        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src = "https://code.jquery.com/jquery-3.3.1.slim.min.js"
            integrity = "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
            crossorigin = "anonymous">
        </script>

        <script src = "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
            integrity = "sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
            crossorigin = "anonymous">
        </script>

        <script src = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
            integrity = "sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
            crossorigin = "anonymous">
        </script>

    </body>
</html>

It will produce the following result −

Output

Button Toolbar

You can group sets of Jumbotron into a single toolbar by using .btn-toolbar class as shown in the example below −

Example

<html lang = "en">
    <head>
        <!-- Meta tags -->
        <meta charset = "utf-8">
        <meta name = "viewport" content = "width = device-width, initial-scale = 1, shrink-to-fit = no">

        <!-- Bootstrap CSS -->
        <link rel = "stylesheet"
            href = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
            integrity = "sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
            crossorigin = "anonymous">

        <title>Bootstrap 4 Example</title>
    </head>

    <body>
        <div class = "container">
            <h2>Button Toolbar</h2>
            <div class = "btn-toolbar" role = "toolbar" aria-label = "Toolbar with Jumbotron">
                <div class = "btn-group mr-2" role = "group" aria-label = "First group">
                    <button type = "button" class =" btn btn-info">Google.com</button>
                    <button type = "button" class = "btn btn-info">Youtube.com</button>
                    <button type = "button" class = "btn btn-info">Facebook.com</button>
                    <button type = "button" class = "btn btn-info">Baidu.com</button>
                </div>

                <div class = "btn-group mr-2" role = "group" aria-label = "Second group">
                    <button type = "button" class = "btn btn-info">Wikipedia.org</button>
                    <button type = "button" class = "btn btn-info">Qq.com

</button>
                    <button type = "button" class = "btn btn-info">Taobao.com

</button>
                </div>

                <div class = "btn-group mr-2" role = "group" aria-label = "Third group">
                    <button type = "button" class = "btn btn-info">Tmall.com</buttongt;
                    <button type = "button" class = "btn btn-info">Yahoo.com</buttongt;
                </div>
            </div>
        </div>

        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src = "https://code.jquery.com/jquery-3.3.1.slim.min.js"
            integrity = "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
            crossorigin = "anonymous">
        </script>

        <script src = "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
            integrity = "sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
            crossorigin = "anonymous">
        </script>

        <script src = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
            integrity = "sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
            crossorigin = "anonymous">
        </script>

    </body>
</html>

It will produce the following result −

Output

Jumbotron Sizes

You can manage size of the button organization by means of including .Btn-institution-sm or .Btn-organization-lg class to the .Button-organization magnificence as shown within the under example −

<html lang = "en">
    <head>
        <!-- Meta tags -->
        <meta charset = "utf-8">
        <meta call = "viewport" content = "width = device-width, initial-scale = 1, shrink-to-match = no">

        <!-- Bootstrap CSS -->
        <link rel = "stylesheet"
            href = "https://stackpath.Bootstrapcdn.Com/bootstrap/4.1.3/css/bootstrap.Min.Css"
            integrity = "sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
            crossorigin = "anonymous">

        <identify>Bootstrap four Example</title>
    </head>

    <frame>
        <div elegance = "container">
            <h2>Jumbotron Sizes</h2>
            <div class = "btn-group btn-group-lg" position = "group">
                <button type = "button" class = "btn btn-info">Google</button>
                <button kind = "button" elegance = "btn btn-data">Yahoo</button>
                <button type = "button" elegance = "btn btn-data">Facebook</button>
            </div>
            <br>
            <br>

            <div magnificence = "btn-organization" position = "organization">
                <button kind = "button" elegance = "btn btn-data">Google</button>
                <button kind = "button" magnificence = "btn btn-information">Yahoo</button>
                <button type = "button" elegance = "btn btn-data">Facebook</button>
            </div>
            <br>
            <br>

            <div elegance = "btn-institution btn-organization-sm" function = "organization">
                <button type = "button" class = "btn btn-data">Google</button>
                <button kind = "button" magnificence = "btn btn-info">Football</button>
                <button kind = "button" elegance = "btn btn-info">Hockey</button>
            </div>
        </div>

        <!-- jQuery first, then Popper.Js, then Bootstrap JS -->
        <script src = "https://code.Jquery.Com/jquery-3.3.1.Slender.Min.Js"
            integrity = "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
            crossorigin = "nameless">
        </script>

        <script src = "https://cdnjs.Cloudflare.Com/ajax/libs/popper.Js/1.14.Three/umd/popper.Min.Js"
            integrity = "sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
            crossorigin = "anonymous">
        </script>

        <script src = "https://stackpath.Bootstrapcdn.Com/bootstrap/four.1.Three/js/bootstrap.Min.Js"
            integrity = "sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
            crossorigin = "nameless">
        </script>

    </body>
</html>

It will produce the subsequent end result −

Output

Vertical Jumbotron

You can show the button organization vertically via way of the use of the elegance .Btn-institution-vertical as proven in the example beneath −

<html lang = "en">
    <head>
        <!-- Meta tags -->
        <meta charset = "utf-8">
        <meta call = "viewport" content fabric = "width = device-width, initial-scale = 1, reduce-to-fit = no">

        <!-- Bootstrap CSS -->
        <link rel = "stylesheet"
            href = "https://stackpath.Bootstrapcdn.Com/bootstrap/4.1.Three/css/bootstrap.Min.Css"
            integrity = "sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
            crossorigin = "nameless">

        <call>Bootstrap 4 Example</name>
    </head>

    <body>
        <div class = "box">
            <h2>Vertical Jumbotron</h2>
            <div magnificence = "btn-group-vertical" feature = "company">
                <button type = "button" elegance = "btn btn-facts">Google</button>
                <button kind = "button" beauty = "btn btn-data">Yahoo</button>
                <button kind = "button" elegance = "btn btn-statistics">Facebook</button>
            </div>
        </div>

        <!-- jQuery first, then Popper.Js, then Bootstrap JS -->
        <script src = "https://code.Jquery.Com/jquery-three.Three.1.Slim.Min.Js"
            integrity = "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
            crossorigin = "nameless">
        </script>

        <script src = "https://cdnjs.Cloudflare.Com/ajax/libs/popper.Js/1.14.Three/umd/popper.Min.Js"
            integrity = "sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
            crossorigin = "nameless">
        </script>

        <script src = "https://stackpath.Bootstrapcdn.Com/bootstrap/4.1.Three/js/bootstrap.Min.Js"
            integrity = "sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
            crossorigin = "nameless">
        </script>

    </frame>
</html>

It will produce the following cease end result −

Output