cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              
<nav id=menu_container class=menu_container>
  <ul id=menu class=menu>
    <li><a class=menu_lnk-1 href="">Articles</a></li>
    <li><a class=menu_lnk-2 href="">Tools</a></li>
    <li><a class=menu_lnk-3 href="">CodePens</a></li>
    <li><a class=menu_lnk-4 href="">Portfolio</a></li>
  </ul>
</nav>


<section style="margin:1rem">
  <p>Removed the initial transform transition and replaced with a filter transition.<br>Much more consistant cross-browser.<br>Border looks better in black and thicker now too.</p>
</section>


<section>

  <label>Border width: <input id="rangeBorder" type="range" min="0" max="5" value="1"/></label>
  <!-- <label>Blur width: <input id="rangeBlur" type="range" min="0" max="5" value="2"/></label> -->

  <script>
    /* Just for the sliders */

    var rangeBorder = document.getElementById("rangeBorder");
    rangeBorder.addEventListener("change", function () {
      document.getElementById("menu").className = "menu border" + this.value;
    }, false);

    var rangeBlur = document.getElementById("rangeBlur");
    rangeBlur.addEventListener("change", function () {
      document.getElementById("menu_container").className = "menu_container blur" + this.value;
    }, false);
  </script>

</section>
<!--
<footer>
  <div class="menu_container-footer">
    <ul class="menu">
      <li><a class=menu_lnk-1 href="">Contact</a></li>
      <li><a class=menu_lnk-3 href="">Site-map</a></li>
      <li><a class=menu_lnk-4 href="">Accessibility</a></li>
      <li><a class=menu_lnk-2 href="">Privacy</a></li>
      <li><a class=menu_lnk-1 href="">T&amp;Cs</a></li>
    </ul>
  </div>
</footer>
-->
            
          
!
            
              





body {
  max-width: none;
  padding: 0;
}

*, *::after, *::before {
  -moz-box-sizing: inherit;
  -webkit-box-sizing: inherit;
  box-sizing: inherit;
}

footer {
  width: 100%;
  position:fixed;
  bottom: 0;
}

[class^="menu_container"] {
  margin: 0;
  padding: 0 2.618rem;
  background-color: #4B3D5A;
}

.menu {
  display: flex;
  max-width: 34rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu li {
  margin: .618rem;
  
  flex: 1 1 0;
  text-align: center;
}

[class*="menu_lnk"],
[class*="menu2_lnk"] {
  padding: .618rem;
  color: #fff;
  z-index: 5;
  text-decoration: none;
  
  position: relative;
  display: block;
  background-color: #4B3D5A;
}
[class*="menu2_lnk"]:focus,
[class*="menu_lnk"]:focus {
  outline: 1px solid transparent;
}

[class*="menu2_lnk"]::before {
/*   background-color: black; */
  background-image: url(#bg_goo);
  background-size: contain;
  content: " ";
  display: block;
  position:absolute;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  z-index: 5;
}



/* Menu link ::before has the wobble */

[class*="menu_lnk"]::before {
  background-color: black;
  background-color: #0e001d;
  content: "";
  display: block;
  position:absolute;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  z-index: -1;

 /* This was ignored by Chrome
  transition: transform .3s ease-out,  opacity .3s ease-out;
  transform: scale(0);
  opacity: 0; */
  
  /* Testing filter transition instead, not quite the same though */
  transition: -webkit-filter .3s ease-in,  filter .3s ease-in;
  -webkit-filter: blur(2px) opacity(0%);
  filter: blur(2px) opacity(0%);

  border: 3px solid #000;
  margin-top: -3px;

  animation: menu-hover-off .5s ease-out forwards;

}

[class*="menu_lnk"]:hover::before,
[class*="menu_lnk"]:focus::before {
  
  /* Ignored by Chrome
  transform: scale(1.1, 1.2);
  opacity: 1;*/
  
  -webkit-filter: blur(2px) opacity(100%);
  filter: blur(2px) opacity(100%);
  
  animation: menu-hover-on 1s ease-in .25s infinite;
}

/* variance */
.menu_lnk-1::before {
  border-radius: .5rem 100%;
}
.menu_lnk-2::before {
  border-radius: 1rem 50%;
}
.menu_lnk-3::before {
  border-radius: .5rem 2rem .5rem 100%;
}
.menu_lnk-4::before {
  border-radius: 1rem 100% 100% 100% ;
}

/* Rectangular objects */
@keyframes menu-hover-on {
  0% {transform: rotate(0deg); border-radius: .5rem 100%;}
  10% {transform: rotate(-4deg); border-radius: 25% 100% 25% 50%}
  20% {transform: rotate(0deg); border-radius: .5rem 100%;}
  30% {transform: rotate(-4deg); border-radius: 25% 50% 25% 100%;}
  40% {transform: rotate(0deg); border-radius: .5rem 100%;}
  50% {transform: rotate(0deg); border-radius: 100%;}
  60% {transform: rotate(0deg); border-radius: .5rem 100%;}
  70% {transform: rotate(4deg); border-radius: 100% 25% 50% 25%;}
  80% {transform: rotate(0deg); border-radius: .5rem 100%;}
  90% {transform: rotate(4deg); border-radius: 50% 25% 100% 25%}
  100% {transform: rotate(0deg); border-radius: .5rem 100%;}
}

@keyframes menu-hover-off {
  0% {transform: scale(1); opacity: 1}
  100% {transform: scale(0); opacity: 0}
}



/* Sliders */

section {
  margin-top: 3rem;
}
label {
  display: block; 
  margin: 1rem;
}
[type="range"] {
  vertical-align:bottom
}


/* Playing with border values */

.border0 ::before {
  border-width: 0px;
}
.border1 ::before {
  margin-top: -1px;
  border-width: 1px;
}
.border2 ::before {
  margin-top: -2px;
  border-width: 2px;
}
.border3 ::before {
  margin-top: -3px;
  border-width: 3px;
}
.border4 ::before {
  margin-top: -4px;
  border-width: 4px;
}
.border5 ::before {
  margin-top: -5px;
  border-width: 5px;
}


/* Playing with blur values */

.blur0 ::before {
  -webkit-filter: blur(0);
  filter: blur(0);
}
.blur1 ::before {
  -webkit-filter: blur(1px);
  filter: blur(1px);
}
.blur2 ::before {
  -webkit-filter: blur(2px);
  filter: blur(2px);
}
.blur3 ::before {
  -webkit-filter: blur(3px);
  filter: blur(3px);
}
.blur4 ::before {
  -webkit-filter: blur(4px);
  filter: blur(4px);
}
.blur5 ::before {
  -webkit-filter: blur(5px);
  filter: blur(5px);
}


/* This only works on round objects */
@keyframes menu-hover-on-i-ROUND {
  0% {transform: scale(1) rotate(0deg); border-radius: 50%}
  10% {transform: scale(1) rotate(30deg); border-radius: 20% 50% 30% 50%}
  20% {transform: scale(1) rotate(0deg); border-radius: 50%}
  30% {transform: scale(1) rotate(-30deg); border-radius: 20% 50% 30% 50%}
  40% {transform: scale(1) rotate(0deg); border-radius: 50%}
  50% {transform: scale(1) rotate(30deg); border-radius: 50% 20% 50% 30%}
  60% {transform: scale(1) rotate(0deg); border-radius: 50%}
  70% {transform: scale(1) rotate(-30deg); border-radius: 50% 30% 50% 20%}
  80% {transform: scale(1) rotate(0deg); border-radius: 50%}
  90% {transform: scale(1) rotate(30deg); border-radius: 20% 20% 30% 30%}
  100% {transform: scale(1) rotate(0deg); border-radius: 50%}
}
            
          
!
999px
Loading ..................

Console