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


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


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.


                <h1>Animated <code>:focus</code> styles for keyboard users</h1>

<p>Hint: You have to use the <kbd>TAB</kbd> key</p>

<button>Style 1</button> 
<button>Style 2</button>
<button>Style 3</button>


                /* get rid of inner focus */
input::-moz-focus-inner {
    border: 0;
    padding: 0;

/* generic button styles */
button {
  background: #5245F5;
  border: 0;
  font-size: 2em;
  margin: 0.5em;
  padding: 0.25em 1em;
  color: #fff;
  cursor: pointer;
  transition: 1.25s ease all;
  font-family: inherit;

/* bit of hover */
button:hover {
  background: #3F3889;

/* first animated focus style */
button:nth-of-type(1) {
  outline: thin dotted transparent;
  outline-offset: 1em;

button:nth-of-type(1):focus {
  outline-color: #222;
  outline-offset: 0.125em;

/* second animated focus style */
button:nth-of-type(2) {
  outline: thin solid transparent;
  outline-offset: 1em;

button:nth-of-type(2):focus {
  outline: 3px solid #222;
  outline-offset: 0;

/* third animated focus style */
button:nth-of-type(3) {
  outline: 1em solid transparent;

button:nth-of-type(3):focus {
  outline: 3px solid #3F3889;
  outline-offset: 0;

button:active {
  outline: none;
  position: relative;
  top: 2px;  

/* just some layout */

body {
  text-align: center;
  font-size: 125%;
  font-family: georgia, serif;
  color: #222;

p {
  font-size: 1.5em;

kbd {
  font-weight: bold;
  background: #ccc;
  padding: 0.125em 0.33em;
  border-radius: 0.125em;
  box-shadow: 0 0.25em #999;