Bootstrap breadcrumbs navigation


May 04, 2021 07:00 Bootstrap


Table of contents


Bootstrap Breadcrumbs

Breadcrumbs is a way to display information based on the site hierarchy. I n the case of blogs, breadcrumbs navigation can display release dates, categories, or labels. They represent the position of the current page within the navigation hierarchy.

Breadcrumbs in Bootstrap is a simple sequenceless table with .breadcrumb class. Separators are automatically added through class .css shown in CStrap (bootstrap.min):

.breadcrumb > li + li:before {
    color: #CCCCCC;
    content: "/ ";
    padding: 0 5px;}

The following example demonstrates breadcrumb navigation:

<!DOCTYPE html>
 <html>
  <head>
   <title>Bootstrap 实例 - 面包屑导航</title>
   <link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="external nofollow" target="_blank"  rel="stylesheet">
   <script src="//cdn.bootcss.com/jquery/2.1.1/jquery.min.js" rel="external nofollow" ></script>
   <script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js" rel="external nofollow" ></script>
  </head>
 <body>
  <ul class="breadcrumb">
   <li><a href="#">Home</a></li>
   <li><a href="#">2013</a></li>
   <li class="active">十一月</li>
  </ul>
 </body>
</html>

The result is as follows:

Bootstrap breadcrumbs navigation