Materialize CSS breadcrumbs display the current page location inside the website navigation hierarchy. It highlights the active page & separates the item with a separator and It is used due to multiple layers of content.
.nav-wrapper
class to the container.
<div class="nav-wrapper"></div>
.breadcrumb
class to the every breadcrumb item i.e hyperlink(<a>
) element base class.
<div class="nav-wrapper">
<a href="#!" class="breadcrumb">Breadcrumb Item</a>
</div>
General Syntax
<div class="nav-wrapper">
<a href="#!" class="breadcrumb">Breadcrumb Item</a>
</div>
Source Code
<div class="row">
<div class="col s12">
<nav>
<div class="nav-wrapper">
<a href="#!" class="breadcrumb"> Home </a>
<a href="#!" class="breadcrumb">About </a>
</div>
</nav>
</div>
</div>
Source Code : Output
Materialize breadcrumb's default separator can be changed easily by overriding the CSS default properties of the .breadcrumb
class.
General Syntax
.breadcrumb:before{
content: ">>> ";
}
Simply, override the color property of breadcrumb:before
class to change the breadcrumb separator color.
Source Code
.breadcrumb:before{
color: orange;
}
To change the Breadcrumb link color,simply change the color property of .breadcrumb
and breadcrumb:last-child
class.
The breadcrumb:last-child
class is used to change the breadcrumb active link color.
Source Code
.breadcrumb{
color: white;
}
.breadcrumb:last-child{
color: yellow ;
}