css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">  
<div class="wrapper">
<section class="header">

  <div class="logo-and-nav-wrap">
			
      <div class="logo-wrap">
				<a href="#/global"><img alt="company logo" height="60px" src="http://svgshare.com/i/34L.svg" width="100px"></a>
			</div>
      
			<div class="site-nav-wrap">
         <nav class="nav">
					
				
						<div class="single-breadcrumb-wrap">
							<span class="sep"><i class="fa fa-caret-right"></i></span> <span class="breadcrumb"><a href="#">Universe</a></span>
						</div>
						<div class="single-breadcrumb-wrap">
							<span class="sep"><i class="fa fa-caret-right"></i></span> <span class="breadcrumb"><a href="#">Milky Way</a></span>
						</div>
						<div class="single-breadcrumb-wrap">
							<span class="sep"><i class="fa fa-caret-right"></i></span> <span class="breadcrumb"><a href="#">Solar System</a></span>
						</div>
						<div class="single-breadcrumb-wrap">
							<span class="sep"><i class="fa fa-caret-right"></i></span> <span class="breadcrumb"><a href="#">Earth</a></span>
						</div>						
           <div class="single-breadcrumb-wrap">
							<span class="sep"><i class="fa fa-caret-right"></i></span> <span class="breadcrumb"><a href="#">Internet</a></span>
						</div>
				</nav>
			</div>
		</div>
	</section>

  <section class="body">
    <div class="content">
      <p>Play with the browser size to see how the breadcrumbs behave when there's no room left for them</p>
      <ul>
        <li>Mouse hover cancels ellipsis</li>
        <li>Shrinks when not enough space</li>
      </ul>
    </div>
    </section>
  </div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');

:root {
  --main-color: #b6ceff;
  --hover-color: #527cff;
  --icon: "\f105";
  --border-color: #ddd;
  --sidebar-width: 160px;
}

* {
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
  // outline: 1px solid tomato !important;
}

.wrapper {
    box-shadow: 0px 0px 10px var(--main-color);
    width: 80%;
    margin: 20px auto;
}
a, a:visited {
  text-decoration: none;
  color: var(--main-color);
  transition: color ease-in-out .3s, background ease-in-out .2s;
  // transform: scale(.8);
}


.header {
  // border: 1px solid #ddd;

  margin: 0 auto;
  overflow: hidden;
  // padding: 10px;
  // width: 60%;
  border-bottom: 1px solid var(--border-color);
}

.body {
  // padding-left: 180px;
  padding-top: 20px;
}
.content {
  margin-left: var(--sidebar-width);
  // min-height: 300px;
  display: flex;
  flex-flow: column nowrap;
  height: 100%;
}


.logo-and-nav-wrap {
  display: flex;
  align-items: center;
}
.site-nav-wrap {
  padding-left: 30px;
  font-size: 20px;
  font-weight: 300;
  color: var(--main-color);
  // margin-top: 5px;
  overflow: hidden;
  width: fit-content;
  // resize: both;
}

.logo-wrap {
  // flex: 0 0 75px;
  padding: 0 20px;
  // border-right: 1px solid var(--border-color);
  width: var(--sidebar-width);
}

.nav {
  display: flex;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 30px;
}


/// --------------- ///
/// THE BREADCRUMBS ///
/// --------------- ///

//background color effect (disabled now)
.single-breadcrumb-wrap:before {
    content:'';
    background-image: linear-gradient(-33deg,#ff0d64 0,#9c3483 100%);
    width: 100%;
    height: 100px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: -1;
    transition: transform ease-in-out .5s;
    transform: scalex(0);
    transform-origin: left top;

    // THIS IS THE BACKGROUND EFFECT - CURRENTLY DISABLED
    display:none;
  }
  //hover effect
  .single-breadcrumb-wrap:hover:before {
      transform: scalex(1);
  }
/////


.single-breadcrumb-wrap {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 auto;
  flex-shrink: 1000;
  display: inline-block;
  padding: 10px 5px 15px 0;
  border-bottom: 1px solid transparent;
  color: var(--main-color);
  position: relative;
  // margin-left: 5px;
  // opacity: .95;
  transition: transform ease-in-out .3s;
  
  //Hover
  &:hover {
    flex: 1 0 auto;
    opacity: 1;
    color: var(--hover-color);
    transform: translatey(-2px);
    transition: none;
    .breadcrumb {
      
    }
     a {
        // transform: scale(1);
        color: var(--hover-color);
        }
    .sep {
      i {
          transform: translatex(8px);
          color: var(--hover-color);
          transition: transform ease-in-out .3s;
        }
    }
    // transform: translateX(0);
    opacity: 1;
    transition: transform ease-in-out .4s;
    
    ~ .single-breadcrumb-wrap {
      // transform: translateX(10px);
      transition: transform ease-in-out .4s;
      // opacity: .2;
    }
  }
  
  //First Breadcrumb
  &:first-child {
    flex: 0 0 auto;
    flex-shrink: 0.5;
    // font-size: 32px;
    // transition: none;
    // transform: none;
    font-weight: normal;
    color: var(--hover-color);
    opacity: 1;
    
    &:after {
      left: 0;
      // display: none;
    }
    .sep {
      display: none;
    }
  }
  
  
//Last Breadcrumb
&:last-child {
    flex: 1 0 auto !important;
    font-weight: normal;
    
    a {
        color: var(--hover-color);
    }

    &:hover {
      transform: translateY(0);
      flex: 1 0 auto !important;
      &:after {
        display: none;
      }
    }
  }
  
}

//Underline effect
.single-breadcrumb-wrap:after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 28px;
    top: 36px;
    width: 100%;
    height: 1px;
    background: var(--hover-color);
    // outline: 1px solid red;
    
    transform: scale3d(0,1,1);
    transform-origin: 0% 50%;
    transition: transform ease-in-out .15s .10s,
                opacity ease-in-out .25s;
    opacity: .5;
  // transform: scale3d(1,1,1);
}
//hover effect
.single-breadcrumb-wrap:hover:after {
    transform: scale3d(1,1,1);
    opacity: 1;
    transition: opacity ease-in-out .1s, transform ease-in-out .2s;
  
}
//////////////////


.breadcrumb {
  flex: 0 1 auto;
}
.sep {
  padding-left: 10px;
  padding-right: 10px;

  
  i.fa:before {
    content: var(--icon);
    transition: transform ease-in-out .2s;
  }
}


            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console