JSFiddle - React, Tailwind, and code Playground
by Kocsten
HTML
<div class="breadcrumb">
<a href="#" class="active">ZORNET.RU</a>
<a href="#">ABOUT</a>
<a href="#">GALLERY</a>
<a href="#">BLOG</a>
</div>
<br /><br />
<div class="breadcrumb flat">
<a href="#" class="active">ZORNET.RU</a>
<a href="#">LINKS</a>
<a href="#">MUSIC</a>
<a href="#">CONTACT</a>
</div>
CSS
/*custom font*/
@import url(https://fonts.googleapis.com/css?family=Merriweather+Sans);
* {margin: 0; padding: 0;}
html, body {min-height: 100%;}
body {
text-align: center;
padding-top: 100px;
background: #333333;
background: linear-gradient(#333333, #111111);
font-family: 'Merriweather Sans', arial, verdana;
}
.breadcrumb {
/*centering*/
display: inline-block;
box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.35);
overflow: hidden;
border-radius: 5px;
/*Lets add the numbers for each link using CSS counters. flag is the name of the counter. to be defined using counter-reset in the parent element of the links*/
counter-reset: flag;
}
.breadcrumb a {
text-decoration: none;
outline: none;
display: block;
float: left;
font-size: 12px;
line-height: 36px;
color: white;
/*need more margin on the left of links to accomodate the numbers*/
padding: 0 10px 0 60px;
background: #333;
background: linear-gradient(#333, #111);
position: relative;
}
/*since the first link does not have a triangle before it we can reduce the left padding to make it look consistent with other links*/
.breadcrumb a:first-child {
padding-left: 46px;
border-radius: 5px 0 0 5px; /*to match with the parent's radius*/
}
.breadcrumb a:first-child:before {
left: 14px;
}
.breadcrumb a:last-child {
border-radius: 0 5px 5px 0; /*this was to prevent glitches on hover*/
padding-right: 20px;
}
/*hover/active styles*/
.breadcrumb a.active, .breadcrumb a:hover{
background: #111;
background: linear-gradient(#333, #111);
}
.breadcrumb a.active:after, .breadcrumb a:hover:after {
background: #222;
background: linear-gradient(145deg, #333, #222);
}
/*adding the arrows for the breadcrumbs using rotated pseudo elements*/
.breadcrumb a:after {
content: '';
position: absolute;
top: 0;
right: -18px; /*half of square's length*/
/*same dimension as the line-height of...