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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

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.

HTML

            
              
<div class="attention">
  <div class="bubble"></div>
</div>

<nav class="nav">
  <div class="nav-logo">
    <a href="https://adventureplanner.poferries.com/en"><img src="https://adventureplanner.poferries.com/wp-content/themes/adventure-planner/img/stacked_logo.png" /></a>
  </div>

  <div class="nav-search">
    <form action="https://adventureplanner.poferries.com/en/" method="get">
      <input type="text" class="search" name="s" placeholder="Search for a destination" autocomplete="off">
    </form>
  </div>

  <select name="lang_choice_1" id="lang_choice_1">
	<option value="en" selected="selected">English</option>
	<option value="nl">Nederlands</option>
	<option value="fr">Français</option>

</select>

  <script type="text/javascript">
    //<![CDATA[
    var urls_1 = {
      "en": "https:\/\/adventureplanner.poferries.com\/en\/",
      "nl": "https:\/\/adventureplanner.poferries.com\/nl\/",
      "fr": "https:\/\/adventureplanner.poferries.com\/fr\/"
    };
    document.getElementById("lang_choice_1").onchange = function() {
      location.href = urls_1[this.value];
    }
    //]]>
  </script>
  <div class="nav-menu">
    <div class="nav-menu-line-1"></div>
    <div class="nav-menu-line-2"></div>
    <div class="nav-menu-line-3"></div>
  </div>
</nav>

<div class="menu">
  <div class="row auto gutters">
    <div class="col">

      <div class="menu-primary-menu-container">
        <ul id="primary-menu" class="menu-pages">
          <li id="menu-item-3157" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3157"><a href="/">Home</a></li>
          <li id="menu-item-2889" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2889"><a href="https://adventureplanner.poferries.com/en/destinations/">Destinations</a></li>
          <li id="menu-item-3331" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3331"><a href="https://adventureplanner.poferries.com/en/interests/">Interests</a></li>
          <li id="menu-item-2890" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-2890"><a href="https://adventureplanner.poferries.com/en/collections/">Collections</a></li>
          <li id="menu-item-2880" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2880"><a target="_blank" href="http://www.poferries.com/en/contact%20">Contact</a></li>
        </ul>
      </div>
    </div>
    <div class="col">
      <ul class="menu-list">
        <li>Explore Countries</li>

        <li><a href="https://adventureplanner.poferries.com/en/country/belgium-breaks/">Belgium</a></li>
        <li><a href="https://adventureplanner.poferries.com/en/country/france-breaks/">France</a></li>
        <li><a href="https://adventureplanner.poferries.com/en/country/germany-breaks/">Germany</a></li>
        <li><a href="https://adventureplanner.poferries.com/en/country/ireland-breaks/">Ireland</a></li>
        <li><a href="https://adventureplanner.poferries.com/en/country/holland-breaks/">Netherlands</a></li>
        <li><a href="https://adventureplanner.poferries.com/en/country/northern-ireland-breaks/">Northern Ireland</a></li>
      </ul>
    </div>

    <div class="col">
      <ul class="menu-list">
        <li>Top Destinations</li>
        <a class="thumbnail" href="https://adventureplanner.poferries.com/en/germany-breaks/cologne-activities/">
  <img src="https://adventureplanner.poferries.com/wp-content/uploads/2017/07/Cologne.jpg" />
  <div class="thumbnail-info">



    <h3>Cologne</h3>
    <p>Germany</p>
    <!-- <span>£££</span> -->
  </div>
</a>
        <a class="thumbnail" href="https://adventureplanner.poferries.com/en/france-breaks/dunkirk-activities/">
  <img src="https://adventureplanner.poferries.com/wp-content/uploads/2017/11/Dunkirk-Dunkerque-beach.jpg" />
  <div class="thumbnail-info">



    <h3>Dunkirk</h3>
    <p>France</p>
    <!-- <span>£££</span> -->
  </div>
</a>
        <a class="thumbnail" href="https://adventureplanner.poferries.com/en/holland-breaks/breda-activities/">
  <img src="https://adventureplanner.poferries.com/wp-content/uploads/2017/10/Lighthouse-in-Breda-by-the-sunset-BREDA-FEATURE.jpg" />
  <div class="thumbnail-info">



    <h3>Breda</h3>
    <p>Netherlands</p>
    <!-- <span>£££</span> -->
  </div>
</a>

      </ul>
    </div>
  </div>
</div>
            
          
!

CSS

            
              $sm: 768px !default;

nav {
 position: fixed;
 display: flex;
 flex-direction: row;
 justify-content: flex-start;
 align-items: center;
 background: white;
 width: 100%;
 padding: 20px 40px;
 background: #ffffff;
 z-index: 500;

 .label {
   position: absolute;
   opacity: 0;
   z-index: -1;
   visibility: hidden;
 }

 @media (max-width: $sm) {
   padding: 20px;
 }


 .nav-logo {
   height: 32px;
   flex-shrink: 0;
   img {
     height: 100%;
   }
 }

 select {
   width: auto;
   position: absolute;
   right: 65px;
   border: none;
   opacity: 0;
   visibility: hidden;
   transition: 0.5s;

   @media (max-width: $sm) {
     right: 45px;
   }

   @media (min-width: $sm) {
     visibility: visible;
     opacity: 1;
   }

   &.open {
     visibility: visible;
     opacity: 1;
   }
 }

 .nav-search {
   margin-left: 20px;
   border-left: 1px solid #cacaca;
   padding-left: 10px;

   form {
     margin: 0;
     padding: 0;
   }

   @media (max-width: $sm) {
     input {
       &::placeholder {
         color: transparent;
       }
     }
   }
 }

 .nav-menu {
   flex-shrink: 0;
   position: absolute;
   top: 30px;
   right: 40px;
   margin-left: auto;

   @media (max-width: $sm) {
     right: 20px;
   }
 }

}

html:lang(nl-NL) {
  nav {
    select {
      width: 125px;
    }
  }
}


.menu {
  position: fixed;
  height: 81px;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 2px 10px 0 rgba(0,0,0,0.15);
  border-bottom: 1px solid #E3E3E3;
  z-index: 499;
  transition: 0.4s;
  transition-delay: 0.25s;

  .row {
    opacity: 0;
    visibility: hidden;
    transition: 0;
    transition-delay: 0.5s;
  }

  //animation delay for each col in menu
  @for $i from 1 to 10 {
    .col:nth-child(#{$i}) {
      opacity: 0;
      visibility: hidden;
      transition: 0.25s;
      transition-delay: 0;

      // delay transistion for each li in each ul in each col
      @for $i from 1 to 10 {
        ul li:nth-child(#{$i}) {
          transform: translate3d(-10px, 0, 0);
          opacity: 0;
          visibility: hidden;
          transition: 0.2s;
          transition-delay: 0;
        }
      }

      // delay transitions for latest destinations in menu
      @for $i from 1 to 10 {
        .thumbnail:nth-child(#{$i}) {
          transform: translate3d(-10px, 0, 0);
          opacity: 0;
          visibility: hidden;
          transition: 0.2s;
          transition-delay: 0;
        }
      }
    }
  }

  &.open {
    height: 500px;
    padding: 100px 40px;
    transition-delay: 0s;

    .row {
      visibility: visible;
      opacity: 1;
      transition-delay: 0s;
    }

    @media (max-width: $sm) {
      padding: 100px 20px;
      height: 100vh;
      overflow: scroll;
    }

    //animation delay for each col in menu
    @for $i from 1 to 10 {
      .col:nth-child(#{$i}) {
        opacity: 1;
        visibility: visible;
        transition: 0.35s;
        transition-delay: $i * 0.15s + 0.25s;

        // delay transistion for each li in each ul in each col
        @for $i from 1 to 10 {
          ul li:nth-child(#{$i}) {
            transform: translate3d(0, 0, 0);
            opacity: 1;
            visibility: visible;
            transition: 0.35s;
            transition-delay: $i * 0.075s + 0.25s;
          }
        }

        // delay transitions for latest destinations in menu
        @for $i from 1 to 10 {
          .thumbnail:nth-child(#{$i}) {
            transform: translate3d(0, 0, 0);
            opacity: 1;
            visibility: visible;
            transition: 0.35s;
            transition-delay: $i * 0.1s + 0.5s;
          }
        }
      }
    }
  }

  .menu-pages {
    list-style: none;
    margin: 0;

    li {
      margin-bottom: 32px;
      a {
        text-decoration: none;
        color: rgba(0,0,0,0.75);
        font-size: 24px;
        font-weight: 300;
      }
    }
  }

  .menu-list {
    list-style: none;
    margin: 0;

    li {
      margin-bottom: 14px;
      font-size: 14px;
      font-weight: 400;
      color: rgba(0,0,0,0.5);

      a {
        text-decoration: none;
        color: rgba(0,0,0,0.5);
        transition: 0.25s;

        &:hover {
          color: rgba(0,0,0,0.75);
        }
      }

      &:nth-child(1) {
        font-weight: 500;
        color: rgba(0,0,0,0.75);
      }
    }
  }
}


@mixin rings($duration, $delay) {
    opacity: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0;
    bottom: 0;
    content: '';
    height: 100%;
    width: 100%;
    border: 1px solid rgba(17,153,238,0.75);
    border-radius: 100%;
    animation-name: ripple;
    animation-duration: $duration;
    animation-delay: $delay;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(.65,0,.34,1);
    z-index: -1;
}

.attention {
  position: absolute;
  z-index: 998;
  right: 30px;
  top: 45px;
}
.bubble {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 10px;
  width: 10px;
  border-radius: 100%;
  background: #009DFF;
  
  span {
    position: relative;
    font-size: 72px;
    top: 5px;
    left: -5px;
  }
  
  &::after {
    @include rings(3s, 0s);
  }
  
  &::before {
    @include rings(3s, 0.5s);
  }
}


@keyframes ripple {
  from {
    opacity: 1;
    transform: scale3d(0.75,0.75,1);
  }
  
  to {
    opacity: 0;
    transform: scale3d(2.5,2.5,1);
  }
}
            
          
!

JS

            
              // trigger for hamburger
drawer().addEventListener('click', (e) => {
  toggle()
})

// returns hamburger element
function drawer() {
  return document.querySelector('.nav-menu');
}

function lang() {
  return document.querySelector('#lang_choice_1');
}

// returns menu element
function menu() {
  return document.querySelector('.menu');
}

// opens menu
function open() {
  drawer().classList.add('open')
  lang().classList.add('open')
  menu().classList.add('open')
}

// closes menu
function close() {
  drawer().classList.remove('open')
  lang().classList.remove('open')
  menu().classList.remove('open')
}

// toggles menu
function toggle() {
  drawer().classList.toggle('open')
  lang().classList.toggle('open')
  menu().classList.toggle('open')
}
            
          
!
999px

Console