Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="home-icon home-icon-style">
    <a class="nav-link" href="#"><svg  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 75 72" width="100px" height="100px"><path  d="M36,9C53.67,9,68,20.6,68,34.9a22.72,22.72,0,0,1-6.15,15.27L67.79,65l-25.2-5.08c-2.63.07-5.58.71-8.53.79h-1C15.92,60.72,4,48.94,4,34.9,4,20.6,18.33,9,36,9m0,7C22.21,16,11,24.49,11,34.9c0,10.72,9.48,18.8,22.06,18.8h.81c1.18,0,2.47-.2,3.84-.37s3.08-.38,4.69-.42l.8,0L44,53l12.49,2.52-1.11-2.76-1.63-4.08,2.94-3.26A15.83,15.83,0,0,0,61,34.9C61,24.49,49.79,16,36,16Z"/></svg></a>
</div>
<div class="products-icon products-icon-style">
     <a class="nav-link" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 82 60" width="100px" height="100px"><path d="M66,10H14a6,6,0,0,0-6,6V48a6,6,0,0,0,6,6H66a6,6,0,0,0,6-6V16A6,6,0,0,0,66,10Zm3,38a3,3,0,0,1-3,3H14a3,3,0,0,1-3-3V30.67H69ZM11,20.67V16a3,3,0,0,1,3-3H66a3,3,0,0,1,3,3v4.67Z"/></svg></a>
</div>
<div class="services-icon services-icon-style">
      <a class="nav-link" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 68" width="100px" height="100px"><path d="M53.7,8c.9,0,1.87.05,2.9.15,6.27.6,13.52,6.25,14.4,17.07v3.61C70.18,39.19,62.23,52,39,68,15.77,52,7.82,39.19,7,28.83V25.22C7.88,14.4,15.13,8.75,21.4,8.15c1-.1,2-.15,2.9-.15C31.55,8,35,11.08,39,15.75,43,11.08,46.45,8,53.7,8m0,6.89c-4.17,0-5.9,1.25-9.34,5.28L39,26.46l-5.36-6.28c-3.44-4-5.18-5.29-9.34-5.29-.68,0-1.43,0-2.22.11-2.89.28-7.39,3.31-8.08,10.52v3c.85,9,9.26,19.46,25,31C54.74,48,63.15,37.58,64,28.53v-3c-.69-7.21-5.19-10.24-8.09-10.52-.79-.07-1.53-.11-2.21-.11Z"/></svg></a>
             	
          		
              
            
!

CSS

              
                body{
  background-color: #666;
}

/* 未スクロール時のアイコンの色処理*/
.home-icon, .products-icon, .services-icon {
	color:#fff; 
}
.home-icon-style , .products-icon-style , .services-icon-style {
  text-align: center;
	color:#fff; 
}

.home-icon path, .products-icon path, .services-icon  path  {
	fill:#fff;
	-webkit-transition: fill 0.3s ease-out;
 -moz-transition: fill 0.3s ease-out;
 -o-transition: fill 0.3s ease-out;
 -ms-transition: fill 0.3s ease-out;
 transition: fill 0.3s ease-out;
}

.home-icon a:hover path{
	fill:#2BBF82;
}
.products-icon a:hover path{
	fill: #E88080;
}
.services-icon a:hover path{
	fill:#49A7FC;
}

              
            
!

JS

              
                $(document).ready(function() {	   
  $(window).scroll(function() {
	  if ($(this).scrollTop() > 0) {
       //スクロール時のナビバー背景処理、1s遅延で白に
       //(本サンプルでは背景は灰色固定にしています)
		  $('nav.navbar-color').css('transition-duration', '1s');
		  $('nav.navbar-color').css('background-color','#FFFFFF');
		  $('.home-icon path').css('fill','#666');
		  $('.products-icon path').css('fill','#666');
		  $('.services-icon path').css('fill','#666');
      //スクロール時のhover時のアイコン処理
		  $('li.home-icon').hover(function() {
  				//〜マウスを乗せたときの処理〜
			  	$('.home-icon path').css('fill','#2BBF82');			  
		  	}, function() {
 				// 〜マウスを離したときの処理〜
			   $('.home-icon path').css('fill','#666');
		  	});
		  $('li.products-icon').hover(function() {
  				//〜マウスを乗せたときの処理〜
		  		$('.products-icon path').css('fill','#E88080');  
			}, function() {
 				// 〜マウスを離したときの処理〜
				$('.products-icon path').css('fill','#666');
			});
		  $('li.services-icon').hover(function() {
					//〜マウスを乗せたときの処理〜
			  	$('.services-icon path').css('fill','#49A7FC');		
		  	}, function() {
 				// 〜マウスを離したときの処理〜
			   $('.services-icon path').css('fill','#666');
		  	});
		  $('cls-1 , a.cls-1').css('color','#2BBF82');
		  $('.cls-1').css('fill','#2BBF82');
		  $('nav').removeClass('navbar-color');
		  
    } else {    //未スクロール時、背景透過
		  $('nav.navbar-wrap').css('background','linear-gradient(180deg, rgba(0,0,0,0.4) 10%, transparent 80%)');
    }
  });
} );


              
            
!
999px

Console