Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

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

Behavior

Auto Save

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.

HTML

              
                <a class="arrow arrow-left" title="Previous" href="javascript:;"></a>

<a class="arrow arrow-right" title="Next" href="javascript:;"></a>





<!-- Youtube video tutorial! -->
<!-- My first ever screen-recording/tutorial haha : ) Give it a view please! -->
<a class="video" href="https://bit.ly/YzWdcy" target="_blank">Video Tutorial</a>
              
            
!

CSS

              
                .arrow {
  position: absolute;
  padding: 3rem; /* Arrow size */
          box-shadow: 1px -1px 0 1px plum inset;
  -webkit-box-shadow: 2px -2px plum inset;
  border: solid transparent;
  border-width: 0 0 2rem 2rem;
  transition: 0.2s;
}

.arrow:hover {
          box-shadow: 2px -2px 0 2px orchid inset;
  -webkit-box-shadow: 4px -4px orchid inset;
}

.arrow-up    { transform:rotate(135deg) }
.arrow-right { transform:rotate(225deg) }
.arrow-down  { transform:rotate(-45deg) }
.arrow-left  { transform:rotate(45deg) }




/* Codepen layout: */
html { height:100% }
body { background-color:lavender }
.arrow { top:50%;margin:-67px 0 0 -67px;left:35% }
a:nth-child(2) { left:65% }

/* Video link: */
.video { font-family:sans-serif;font-size:20px;color:plum;top:2rem;left:2rem;position:absolute }
.video:hover { color:orchid }
              
            
!

JS

              
                // *****************************
//     UPDATE 03/24 5:32pm PST
// I came up with the break-through idea I had been hoping to come up with since the beginning: being able to remove the :before element but keep the better clickable area. The solution: An effing transparent border!!! So I've removed the entire :before element and it's 6 lines of code, and added a transparent border with 2 lines to the .arrow
// Yippee!!
// CSS before the update:
//
// .arrow {
//  box-shadow: -1px 1px 0 1px plum;
//  transition: .24s;
//   transform: rotate(45deg);
//    position: absolute;
//     padding: 50px;
//}
//.arrow:before {
//  position: absolute;
//   padding: 80%;
//   content: '';
//     right: -15%;
//       top: -15%;
//}
// *****************************
// Simple arrows.
// Let me know if you have ideas to make them better!!! : )
// NOTES:
// The border is there only to increase the clickable area. You can remove it and it will work perfectly fine, you'll just only be able to click "inside" the arrow, and not "around" it. If you add a background color you can see it and play with it's size if you want.
// The -webkit-box-shadow is there because without it it displays slightly different in webkit and you can see some of the shadow on the opposite side of the arrow.
// There might be an easier/lite-er way using a simple icon font or something like that, but that's no fun.
// Here's some CSS arrows you can use anywhere, play with, and change the size, color, hover state, and transition in half a second without having to touch anything else.
// Just make another class with a different degree of rotation to have other arrows pointing any direction.
// I experimented using before and after pseudo elements, just borders, and just box-shadows, but this box-shadow + border variation ended up being the one with the least code, yet also the most versatile since you can add multiple shadows and blurs if you want to get more creative.
// These experimentations were inspired by the arrow pens of Olivier Gorzalka - https://codepen.io/clearideaz/pen/tGbIi and Steffen Gramberg - https://codepen.io/minustalent/pen/Frhaw
// @vsync (codepen.io/yairEO) pressured me to make them better : )
              
            
!
999px

Console