BootStrap - Abas de navegação - NavTabs

BootStrap - Barra Comum




BootStrap - Abas de navegação - Estilo pilula (pills)




BootStrap - Abas de navegação - Estilo pilula (pills) - mesmo tamanho

para fazer os itens terem a mesma largura use a classe .nav-justified class:

tabs no estilo pilula(pills):


tabs no estilo comum:




BootStrap - Abas de navegação - Selecionáveis ( Toggleable Tabs )

Conforme clicamos na aba o conteúdo da janela é modificado.


HOME

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.


Código da página


<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
</head>
<body>

    <nav class="navbar navbar-light mb-4" style="background-color:aqua">
        <div class="container">
            <div class="navbar-brand mb-0 h1">
                <h3>BootStrap - Abas de navegação - NavTabs</h3>
            </div>
        </div>
    </nav>

    <div style="padding-left:5px" class="container mt-3">
        <ul class="nav nav-tabs">
            <li class="nav-item">
                <a class="nav-link active" href="#">Ativa</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link1</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link2</a>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled" href="#">Inativa</a>
            </li>
        </ul>
    </div>

    <br /><hr /><br />

    <nav class="navbar navbar-light mb-4" style="background-color:aqua">
        <div class="container">
            <div class="navbar-brand mb-0 h1">
                <h3>BootStrap - Abas de navegação - Estilo pilula (pills)</h3>
            </div>
        </div>
    </nav>

    <div style="padding-left:5px" class="container mt-3">
        <ul class="nav nav-pills">
            <li class="nav-item">
                <a class="nav-link active" href="#">Ativa</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link3</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link4</a>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled" href="#">Inativa</a>
            </li>
        </ul>
    </div>

    <br /><hr /><br />

    <nav class="navbar navbar-light mb-4" style="background-color:aqua">
        <div class="container">
            <div class="navbar-brand mb-0 h1">
                <h3>BootStrap - Abas de navegação - Estilo pilula (pills) - mesmo tamanho</h3>
            </div>
        </div>
    </nav>

    <div style="padding-left:5px" class="container mt-3">
        <p>para fazer os itens terem a mesma largura use a classe .nav-justified class:</p>

        <p>tabs no estilo pilula(pills):</p>
        <ul class="nav nav-pills nav-justified">
            <li class="nav-item">
                <a class="nav-link active" href="#">Ativa</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link5</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link6</a>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled" href="#">Inativa</a>
            </li>
        </ul><br>

        <p>tabs no estilo comum:</p>
        <ul class="nav nav-tabs nav-justified">
            <li class="nav-item">
                <a class="nav-link active" href="#">Ativa</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link7</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link8</a>
            </li>
            <li class="nav-item">
                <a class="nav-link disabled" href="#">Inativa</a>
            </li>
        </ul>
    </div>

    <br /><hr /><br />

    <nav class="navbar navbar-light mb-4" style="background-color:aqua">
        <div class="container">
            <div class="navbar-brand mb-0 h1">
                <h3>BootStrap - Abas de navegação - Selecionáveis ( Toggleable Tabs )</h3>
            </div>
        </div>
    </nav>

    <div style="padding-left:5px" class="container mt-3">
        Conforme clicamos na aba o conteúdo da janela é modificado.<br /><br />
        <div class="container mt-3">
            <ul class="nav nav-tabs">
                <li class="nav-item">
                    <a class="nav-link active" data-toggle="tab" href="#home">Home</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-toggle="tab" href="#menu1">Menu 1</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-toggle="tab" href="#menu2">Menu 2</a>
                </li>
            </ul>

            <!-- Tab panes -->
            <div class="tab-content">
                <div id="home" class="container tab-pane active">
                    <br>
                    <h3>HOME</h3>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
                </div>
                <div id="menu1" class="container tab-pane fade">
                    <br>
                    <h3>Menu 1</h3>
                    <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
                </div>
                <div id="menu2" class="container tab-pane fade">
                    <br>
                    <h3>Menu 2</h3>
                    <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>
                </div>
            </div>
        </div>
    </div>




</body>
</html>