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

+ add another resource


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


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.


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.


    <a href="">Rolling 3D Links</a>

<p>Wanted to spice up the links around <a href="">my site</a> and ended up creating this over-the-top rolling animation. Sample copy from <a href=""></a>.</p>

<p>Do you see any <a href="">Teletubbies</a> in here? Do you see a slender <a href="">plastic</a> tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a <a href="">mechanical helicopter</a>that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.</p>

<p>Well, the way they make shows is, they make one show. That show's called a <a href="">pilot</a>. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become <a href="">television programs</a>. Some don't, become nothing. She starred in one of the ones that became nothing.</p>



                body {
	font-family: sans-serif;
	background: #333;
	color: #eee;

a {
	text-decoration: none;
	color: hsl(206, 80%, 50%);

.roll {
	display: inline-block;
	overflow: hidden;

	vertical-align: top;

	-webkit-perspective: 400px;
	   -moz-perspective: 400px;
	   -moz-perspective: 400px;

	-webkit-perspective-origin: 50% 50%;
	   -moz-perspective-origin: 50% 50%;
	        perspective-origin: 50% 50%;
.roll span {
	display: block;
	position: relative;
	padding: 0 2px;

	-webkit-transition: all 400ms ease;
	   -moz-transition: all 400ms ease;
	        transition: all 400ms ease;
	-webkit-transform-origin: 50% 0%;
	   -moz-transform-origin: 50% 0%;
	        transform-origin: 50% 0%;
	-webkit-transform-style: preserve-3d;
	   -moz-transform-style: preserve-3d;
	        transform-style: preserve-3d;
	.roll:hover span {
		background: #111;

		-webkit-transform: translate3d( 0px, 0px, -30px ) rotateX( 90deg );
		   -moz-transform: translate3d( 0px, 0px, -30px ) rotateX( 90deg );
		        transform: translate3d( 0px, 0px, -30px ) rotateX( 90deg );
.roll span:after {
	content: attr(data-title);

	display: block;
	position: absolute;
	left: 0;
	top: 0;
	padding: 0 2px;

	color: #fff;
	background: hsl(206, 80%, 30%);

	-webkit-transform-origin: 50% 0%;
	   -moz-transform-origin: 50% 0%;
	        transform-origin: 50% 0%;

	-webkit-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
	   -moz-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );
	        transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg );


                var supports3DTransforms =['webkitPerspective'] !== undefined || 
                  ['MozPerspective'] !== undefined;

function linkify( selector ) {
    if( supports3DTransforms ) {
        var nodes = document.querySelectorAll( selector );

        for( var i = 0, len = nodes.length; i < len; i++ ) {
            var node = nodes[i];

            if( !node.className || !node.className.match( /roll/g ) ) {
                node.className += ' roll';
                node.innerHTML = '<span data-title="'+ node.text +'">' + node.innerHTML + '</span>';

linkify( 'a' );