123

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.

            
              <a href="#" class="menu example1"><span></span></a>
<a href="#" class="menu example2"><span></span></a>
<a href="#" class="menu example3"><span></span></a>
<a href="#" class="menu example4"><span></span></a>
<a href="#" class="menu example5"><span></span></a>
<a href="#" class="menu example6"><span></span></a>
<a href="#" class="menu example7"><span></span></a>
<a href="#" class="menu example8"><span></span></a>
<a href="#" class="menu example9"><span></span></a>
            
          
!
            
              /* btn */
.menu {
	position: relative;
	display:  inline-block;
	width: 30px;
	height: 30px;
	margin: 25px;
}
.menu span {
	margin: 0 auto;
	position: relative;
	top: 12px;
}
.menu span:before, .menu span:after {
	position: absolute;
	content: '';
}
.menu span, .menu span:before, .menu span:after {
	width: 30px;
	height: 6px;
	background-color: #000;
	display: block;
}
.menu span:before {
	margin-top: -12px;
}
.menu span:after {
	margin-top: 12px;
}
/* --- btn --- */

/* examples */

/* example 1 */
.example1 {
  -webkit-transform: rotate(0deg); transform: rotate(0deg);
	-webkit-transition: 0.2s ease; transition: 0.2s ease;
}
.example1:hover {
	-webkit-transform: rotate(90deg); transform: rotate(90deg);
}

/* example 2 */
.example2 span:before, .example2 span:after {
	-webkit-transition: 0.2s ease; transition: 0.2s ease;
}
.example2:hover span:before, .example2:hover span:after {
	margin-top: 0px;
}

/* example 3 */
.example3 span {
	-webkit-transition: 0.2s ease 0s; transition: 0.2s ease 0s;
}
.example3 span:before, .example3 span:after {
	-webkit-transition-property: margin, opacity; transition-property: margin, opacity;
	-webkit-transition-duration: 0.2s, 0s; transition-duration: 0.2s, 0s;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example3:hover span {
	width: 6px;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example3:hover span:before, .example3:hover span:after {
	margin-top: 0px;
	opacity: 0;
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}

/* example 4 */
.example4 span {
	-webkit-transition: 0.2s ease 0s; transition: 0.2s ease 0s;
}
.example4 span:before, .example4 span:after {
  -webkit-transition-property: margin, opacity; transition-property: margin, opacity;
	-webkit-transition-duration: 0.2s, 0s; transition-duration: 0.2s, 0s;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example4:hover span {
	-webkit-transform: rotate(90deg); transform: rotate(90deg);
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example4:hover span:before, .example4:hover span:after {
	margin-top: 0px;
	opacity: 0;
	-webkit-transition-delay: 0s, .2s; transition-delay: 0s, .2s;
}

/* example 5 */
.example5 span {
	-webkit-transition-duration: 0s; transition-duration: 0s;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example5:hover span {
	background-color: rgba(0,0,0,0.0);
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example5 span:before {
	-webkit-transition-property: margin, -webkit-transform; transition-property: margin, transform;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
}
.example5:hover span:before {
	margin-top: 0;
	-webkit-transform: rotate(45deg); transform: rotate(45deg);
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}
.example5 span:after {
	-webkit-transition-property: margin, -webkit-transform; transition-property: margin, transform;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
}
.example5:hover span:after {
	margin-top: 0;
	-webkit-transform: rotate(-45deg); transform: rotate(-45deg);
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}

/* example 6 */
.example6 span {
	-webkit-transition-duration: 0s; transition-duration: 0s;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example6:hover span {
	background-color: rgba(0,0,0,0.0);
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example6 span:before {
	-webkit-transition-property: margin, -webkit-transform; transition-property: margin, transform;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
	-webkit-transform-origin: 100% 100%; transform-origin: 100% 100%;
}
.example6:hover span:before {
	margin-top: 0;
	-webkit-transform: rotate(22.5deg) skewX(22.5deg); transform: rotate(22.5deg) skewX(22.5deg);
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}
.example6 span:after {
	-webkit-transition-property: margin, -webkit-transform; transition-property: margin, transform;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
	-webkit-transform-origin: 100% 0%; transform-origin: 100% 0%;
}
.example6:hover span:after {
	margin-top: 0;
	-webkit-transform: rotate(-22.5deg) skewX(-22.5deg); transform: rotate(-22.5deg) skewX(-22.5deg);
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}

/* example 7 */
.example7 span {
	-webkit-transition-duration: 0s; transition-duration: 0s;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example7:hover span {
	background-color: rgba(0,0,0,0.0);
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example7 span:before {
	-webkit-transition-property: margin, -webkit-transform; transition-property: margin, transform;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
	-webkit-transform-origin: 0% 100%; transform-origin: 0% 100%;
}
.example7:hover span:before {
	margin-top: 0;
	-webkit-transform: rotate(22.5deg) skewX(22.5deg); transform: rotate(22.5deg) skewX(22.5deg);
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}
.example7 span:after {
	-webkit-transition-property: margin, -webkit-transform; transition-property: margin, transform;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
	-webkit-transform-origin: 0% 0%; transform-origin: 0% 0%;
}
.example7:hover span:after {
	margin-top: 0;
	-webkit-transform: rotate(-22.5deg) skewX(-22.5deg); transform: rotate(-22.5deg) skewX(-22.5deg);
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}

/* example 8 */
.example8 span {
	-webkit-transition: 0.2s ease 0s; transition: 0.2s ease 0s;
}
.example8 span:before, .example8 span:after {
	-webkit-transition-property: margin, opacity; transition-property: margin, opacity;
	-webkit-transition-duration: 0.2s, 0s; transition-duration: 0.2s, 0s;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example8:hover span {
	width: 16px;
	height: 16px;
	margin-top: -5px;
	-webkit-border-radius: 50%; border-radius: 50%;
	-webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.example8:hover span:before, .example8:hover span:after {
	margin-top: 0px;
	opacity: 0;
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}

/* example 9 */
.example9 span {
	-webkit-transition-property: margin, width; transition-property: margin, width;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
}
.example9:hover span {
	margin-top: 6px;
	width: 20px;
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}
.example9 span:after {
  left: 0;
	-webkit-transition-property: margin, left; transition-property: margin, left;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s; transition-delay: 0.2s, 0s;
}
.example9:hover span:after {
	margin-top: 6px;
	left: -5px;
	-webkit-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s;
}
.example9 span:before {
  left: 0;
	-webkit-transition-property: margin, width, left; transition-property: margin, width, left;
	-webkit-transition-duration: 0.2s; transition-duration: 0.2s;
	-webkit-transition-delay: 0.2s, 0s, 0s; transition-delay: 0.2s, 0s, 0s;
}
.example9:hover span:before {
	margin-top: -6px;
	width: 10px;
	left: 5px;
	-webkit-transition-delay: 0s, 0.2s, 0.2s; transition-delay: 0s, 0.2s, 0.2s;
}
            
          
!
            
              /*
Mmia v1.0
Mobile menu icon animations.
This works on hover as an example, the idea: works on click with toogle...

Only webkit prefix (sketch work)
Code a little bit... :S (sketch work)

Made for fun...
*/
            
          
!
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.

Console