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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

HTML

              
                <div class="menu-mobile">
	<button id="trigger" class="menu__trigger show">&#x22EF;&#xFE0E;</button>
</div>

<nav id="nav" class="navigation toggle">
	<div class="language">
		<a class="en" href="#">En</a>
		<a class="ru" href="#">Ru</a>
	</div>
	<ul class="menu">
		<li class="menu__holder"><a class="menu__holder__link scroll active" href="#one">One</a></li>
		<li class="menu__holder"><a class="menu__holder__link scroll" href="#two">Two</a></li>
		<li class="menu__holder"><a class="menu__holder__link scroll" href="#three">Three</a></li>
		<li class="menu__holder"><a class="menu__holder__link scroll" href="#four">Four</a></li>
		<li class="menu__holder"><a class="menu__holder__link scroll" href="#five">Five</a></li>
	</ul>
</nav>

<main class="main-wrapper">
	<section id="one" class="frames">
		<div class="frames__wrapper">
			<span class="frames__wrapper__big-text">Yooo .. i'm adaptive!</span>
			<span class="frames__wrapper__big-text">And mobile friendly.</span>
			<span class="frames__wrapper__big-text">But with flex, sorry IE9..(</span>
		</div>
		<span class="fading"></span>
	</section>

	<section id="two" class="frames">
		<div class="frames__wrapper">
			<p class="frames__wrapper__text fading">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore perspiciatis nam autem nisi maiores at, in repellat ipsum, sequi rerum perferendis sunt adipisci voluptas saepe eius maxime voluptate accusantium cupiditate.</p>
		</div>
	</section>

	<section id="three" class="frames">
		<div class="frames__wrapper">
			<!-- <span class="fading"></span> -->
			<div class="frames__wrapper__skill-holder fading">
				<span class="frames__wrapper__text-fx">Some text here ...</span>
				<span class="frames__wrapper__text-fx">Some text here ...</span>
				<span class="frames__wrapper__text-fx">Some text here ...</span>
				<span class="frames__wrapper__text-fx">Some text here ...</span>
				<span class="frames__wrapper__text-fx">Some text here ...</span>
				<span class="frames__wrapper__text-fx">Some text here ...</span>
			</div>
		</div>
	</section>

	<section id="four" class="frames">
		<div class="frames__wrapper">
			<p class="frames__wrapper__text fading">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Unde laudantium minima, voluptatibus eos odit fugit? Suscipit quo, perspiciatis voluptatem, non omnis blanditiis voluptas porro aperiam soluta, ipsa numquam mollitia aspernatur.</p>
		</div>
	</section>

	<section id="five" class="frames">
		<div class="frames__wrapper">
			<div class="frames__wrapper__icons animated fading">
				<a class="frames__wrapper__icons__links" href="tel:+7777777777">&#xf095;</a>
				<a class="frames__wrapper__icons__links" href="mailto:">&#xf003;</a>
			</div>
		</div>
	</section>
</main>

</body>
</html>
              
            
!

CSS

              
                body, html {
  font-family: "Myriad Pro", Arial, sans-serif;
  display: block;
  margin: 0 auto;
  padding: 0;
  color: #333;
}
.menu-mobile {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  font-size: 1rem;
  margin: 0.5em;
  padding: 0;
  z-index: 555;
}
.menu__trigger {
  font-size: 3rem;
  border: none;
  /*border: 1px solid black;*/
  box-sizing: border-box;
  border-radius: 0.1em;
  cursor: pointer;
  background-color: white;
  font-family: sans-serif;
  padding: 0.35em 0.15em;
  line-height: 1rem;
  /*margin: 1rem;*/
  color: #333;
  outline: none;

  display: flex;
  align-items: center;
  justify-content: center;
}
.navigation {
  width: 100%;
  height: 2.5em;
  position: fixed;
  top: 0;
  z-index: 5;
  background-color: white;

  display: flex;  
  align-items: center;  
  justify-content: space-between;

  animation: navFadeIn 2.75s ease;
}
@keyframes navFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-25em);
  }
  65% {
    opacity: 0;
    transform: translateY(-25em);
  }
  100% {
    opacity: 1;
    transform: translateY(0); 
  }
}
.en, .ru {
  color: #333;
  padding: 0.2em 0.3em;
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-left: 1em;
}
.ru {
  margin-left: 0.25em;
}
.en:hover, .ru:hover {
  background-color: #333;
  color: #FFF;

  transition: .3s ease;
}
.menu {
  margin-right: 5%;
  list-style-type: none;

  display: flex;  
  align-items: center;  
  justify-content: center;
}
.menu__holder {
  margin: 0 3%;

  display: flex;  
  align-items: center;  
  justify-content: center;
}
.menu__holder__link {
  border-bottom: 1px solid transparent;
  padding: 0.3em;
  text-decoration: none;
  color: #333;
  letter-spacing: 0.1em;

  transition: .3s ease;
}
.menu__holder__link:hover {
  color: #466AFF;
  border-bottom: 1px solid #466AFF;
}
.main-wrapper {
  width: 100%;

  display: flex;  
  align-items: center;  
  justify-content: center;  
  flex-direction: column;
}
.frames {
  width: 100%;
  height: 100vh;

  display: flex;  
  align-items: center;  
  justify-content: center;
}
.frames:first-child {
  width: 100%;
  height: 100vh;
}
.frames__wrapper {  
  display: flex;  
  align-items: center;  
  justify-content: center;  
  flex-direction: column;

  width: 100%;
  height: 100vh;
  padding: 0 15%;

  animation: introFadeIn 2s ease;
}
.frames__wrapper__big-text {
  line-height: 1em;
  /*border: 1px solid black;*/
  width: 80%;
  max-width: 850px;
  /*height: 100%;*/
  font-size: 75px;
  font-weight: bold;
  padding: 0;
  margin: 0;
  /*opacity: 1 !important;*/

  display: flex;  
  align-items: center;  
  /*justify-content: center;*/

  color: #333;
  -webkit-text-fill-color: white;
  -webkit-text-stroke-width: 1.5px;
  -webkit-text-stroke-color: #333;

  /*animation: introFadeIn 2s ease;*/
}
@keyframes introFadeIn {
  0% {
    transform: scale(0);
  }
  65% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
.frames__wrapper__text {
  font-size: 18px;
  letter-spacing: 0.05em;
  word-spacing: 0.25em;
  text-indent: 2.5em;
  text-align: justify;
  padding: 5% 15%;

  display: flex;  
  align-items: center;  
  justify-content: center;
}
.frames__wrapper__skill-holder {  
  display: flex;  
  align-items: center;  
  justify-content: center;  
  flex-direction: column;
}
.frames__wrapper__text-fx {
  min-width: 225px;
  font-size: 18px;

  display: flex;  
  align-items: center;  
  justify-content: flex-start;
  line-height: 1px;

  transition: .3s ease;
}
.frames__wrapper__text-fx:nth-child(1) {
  font-size: 20px;
  letter-spacing: 0.5em;
  margin: 0 0 -5px 0;
}
.frames__wrapper__text-fx:nth-child(2) {
  font-size: 30px;
  letter-spacing: 0.25em;
  margin-right: 225px;
}
.frames__wrapper__text-fx:nth-child(3) {
  font-size: 17px;
  letter-spacing: 0.35em;
  margin: -25px 0 0 170px;
}
.frames__wrapper__text-fx:nth-child(4) {
  font-size: 16px;
  letter-spacing: 0.15em;
  margin: 6px 160px 0 0;
}
.frames__wrapper__text-fx:nth-child(5) {
  font-size: 22px;
  letter-spacing: 0.25em;
  margin: -25px 0 0 100px;
}
.frames__wrapper__text-fx:nth-child(6) {
  font-size: 22px;
  letter-spacing: 0.20em;
  margin: 0 25px 0 0;
}
.frames__wrapper:hover .frames__wrapper__text-fx {
  line-height: 30px;
  font-size: 26px;
  letter-spacing: 0.15em;
  margin: 0;
}
.frames__wrapper__icons {  
  display: flex;  
  align-items: center;  
  justify-content: center;  
  flex-direction: row;
}
.frames__wrapper__icons__links {
  border: 3px solid #333;
  border-radius: 10%;
  min-width: 75px;
  min-height: 75px;
  font-size: 40px;
  font-family: 'fontawesome';
  color: #333;
  text-decoration: none;
  margin: 15px;

  display: flex;  
  align-items: center;  
  justify-content: center;

  transition: 150ms ease;
}
.frames__wrapper__icons__links:hover {
  color: #FFF;
  background-color: #333;
}
.frames__wrapper__icons__links:first-child {
  font-size: 42px;
  padding-top: 2px;
  color: #333;

  -webkit-text-fill-color: #FFF;
  -webkit-text-stroke-width: 3px;
  -webkit-text-stroke-color: #333;
}
.frames__wrapper__icons__links:first-child:hover {
  background-color: #333;
  color: #FFF;

  -webkit-text-fill-color: #333;
  -webkit-text-stroke-width: 2px;
  -webkit-text-stroke-color: #FFF;
}
.active {
  color: #466AFF;
  border-bottom: 1px solid #466AFF;
}
.fading {
  opacity: 0;
}
.show {
  visibility: visible;
  display: flex !important;
  opacity: 1;
}
.toggle {}

.hide {
  visibility: hidden;
  opacity: 0;

  /*transition: 500ms;*/
  /*animation: navFadeOut 1.75s ease;*/
}


/* @keyframes navFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  65% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-25em); 
  }
} */

@media only screen and (max-width: 1025px) {
  .frames__wrapper {
    padding: 0 5%;
  }
  .frames__wrapper__big-text {
    /*font-size: 60px;*/
    width: 90%;
  }
}

@media only screen and (max-width: 769px) {
  .frames__wrapper {
    /*padding: 0;*/
  }
  .frames__wrapper__big-text {
    font-size: 56px;
    -webkit-text-stroke-width: 1px;
    margin-bottom: 1%;
  }
  .frames__wrapper__text {
    font-size: 18px;
    padding: 5% 10%;
  }
  .menu {
    margin-right: 7%;
  }
  .frames__wrapper__text-fx:nth-child(-n+6) {
    line-height: 30px;
    font-size: 26px;
    letter-spacing: 0.15em;
    margin: 0;
  }
}

@media only screen and (max-width: 769px) and (max-height: 451px) and (orientation: landscape) {
  .frames__wrapper {
    padding: 0 5%;
  }
  .frames__wrapper__big-text {
    font-size: 44px;
  }
  .frames__wrapper__text {
    font-size: 18px;
    padding: 5%;
  }
  .menu-mobile {
    display: block;
  }
  .navigation {
    display: none;
    height: 100%;
    flex-direction: column;

    animation: navFadeIn .15s ease;
  }
  @keyframes navFadeIn {
    0% {
      opacity: 0;
      transform: scale(0);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
  .language {
    display: none;
  }
  .menu {
    width: 100%;
    height: 100%;
    margin: 0;
    flex-direction: column;
  }
  .menu__holder {
    /*border: 1px solid black;*/
    margin: 0;
    min-width: 85%;
    height: 18%;

    justify-content: flex-start;
  }
  .menu__holder__link {
    border-bottom: 2px solid transparent;
    /*padding: 0 0.1em;*/
    padding: 0.15em 1em 0.15em 0.25em;
    font-size: 200%;
  }
  .menu__holder__link:hover {
    color: #466AFF;
    border-bottom: 2px solid #466AFF;
  }
  .active {
    color: #466AFF;
    border-bottom: 2px solid #466AFF;
  }
}


@media only screen and (max-width: 499px) and (max-height: 751px) and (orientation: portrait) {
  .frames__wrapper__big-text {
    /*font-size: 56px;*/
    /*-webkit-text-stroke-width: 1px;*/
    margin-bottom: 5%;
  }
  .frames__wrapper__text {
    font-size: 18px;
    padding: 5%;
  }
  .menu-mobile {
    display: block;
  }
  .navigation {
    display: none;
    height: 100%;
    flex-direction: column;

    animation: navFadeIn .15s ease;
  }
  @keyframes navFadeIn {
    0% {
      opacity: 0;
      transform: scale(0);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
  .language {
    display: none;
  }
  .menu {
    width: 100%;
    height: 100%;
    margin: 0;
    flex-direction: column;
  }
  .menu__holder {
    /*border: 1px solid black;*/
    margin: 0;
    min-width: 75%;
    height: 12%;
    justify-content: flex-start;
  }
  .menu__holder__link {
    border-bottom: 2px solid transparent;
    padding: 0.25em 1em 0.25em 0.25em;
    font-size: 200%;
  }
  .menu__holder__link:hover {
    border-bottom: 2px solid #466AFF;
  }
  .active {
    color: #466AFF;
    border-bottom: 2px solid #466AFF;
  }
}

@media only screen and (max-width: 376px) {
  .menu__holder {
    min-width: 75%;
  }
}

@media only screen and (max-width: 321px) {

}
              
            
!

JS

              
                // big thanx to Shikkediel from CSS-tricks to make it happens ^_^
$(function() {

  var target = $('.fading'), guide = $('#nav'),
  zenith, nadir, spot, pilot,
  modern = window.requestAnimationFrame;

  storeDimensions();

  $(window).resize(storeDimensions).scroll(function() {

    spot = $(this).scrollTop();

    if (!pilot) {
    if (modern) requestAnimationFrame(checkFade);
    else checkFade();
    }
  });

  $('.scroll').click(function(e) {

    e.preventDefault();
    pilot = true;

    $('.active').removeClass('active');
    $(this).addClass('active');

    var bit = this.hash,
    destination = $(bit).offset().top,
    goal = $(bit).find('.fading');

    if (destination != spot && goal.length) goal.stop().fadeTo(0,0);

    $('html, body').animate({scrollTop: destination}, 500, function() {

      if (!guide.hasClass('toggle')) guide.addClass('toggle').removeClass('show');

      if (goal.length) goal.fadeTo(250, 1, matchParent(bit));

      pilot = false;
    });
  });

function storeDimensions() {

  zenith = []; nadir = [];

  target.each(function() {

    var placement = $(this).offset().top;

    zenith.push(placement-$(window).height()*0.8);
    nadir.push(placement+$(this).outerHeight());
  });
}

function checkFade() {

  target.each(function(i) {

    if (!$(this).is(':animated')) {
    if (spot > zenith[i] && spot < nadir[i]) {
      $(this).fadeTo(250,1);
      var pair = $(this).closest('section')[0].id;
      $('.active').removeClass('active');
      $('[href*="' + pair + '"]').addClass('active');
      if (!$(this).hasClass('arrived')) matchParent('#' + pair);
      $(this).addClass('arrived');
    }
    else {
    $(this).removeClass('arrived');
    if ($(this).css('opacity') != 0) $(this).fadeTo(0,0);
	}
    }
  });
}

function matchParent(item) {

  // if (item == '#two') $(item).css('filter', 'blur(2px)');
  if (item == '#two') $('.frames__wrapper__text ').animateCss('shake');
  if (item == '#three') $('.frames__wrapper__text-fx ').animateCss('wobble');
  if (item == '#four') $('.frames__wrapper__text ').animateCss('shake');
  if (item == '#five') $('.frames__wrapper__icons ').animateCss('wobble');
}

// mobile menu button
$('#trigger').click(function() {
  if (guide.hasClass('toggle')) guide.removeClass('toggle').addClass('show');
  else guide.addClass('toggle').removeClass('show');
});
});

$.fn.extend({
  animateCss: function(animationName) {
    var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
    this.addClass('animated ' + animationName).one(animationEnd, function() {
      $(this).removeClass('animated ' + animationName);
    });
  }
});
              
            
!
999px
Save your sass for CSS. Everywhere else be kind.

Console