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.


                <div id="daft-pnk">
	<audio preload="auto" id="harder" src="">
    <!-- mp3 only as we can (mostly) get away with that now -->
	<audio preload="auto" id="better" src="">
	<audio preload="auto" id="faster" src="">
	<audio preload="auto" id="stronger" src="">
 <nav id="equalizer">
	<a href="#" data-ref="harder">Beats</a>
	<a href="#" data-ref="better">Samples</a>
	<a href="#" data-ref="faster">Loops</a>
	<a href="#" data-ref="stronger">Rhythms</a>


                body { 
  background: #000;
nav#equalizer { 
  background: #111;
  height: 150px;
  display: flex;
  padding: 0 2rem ;
  justify-content: space-between;
nav#equalizer a { 
  text-decoration: none; 
  color: white;
  font-family: Arial Black, sans-serif;
  text-transform: lowercase; 
  text-align: center; 
  letter-spacing: .3em; 
  height: 50px; 
      to top,
      #1E5799 0%,
      #1E5799 50%,
      transparent 51%,
      transparent 100%
  background-size: 100% 10px;
  flex: 1;
  max-width: 200px;
  align-self: flex-end;
  transition: all .2s linear;
nav#equalizer a:hover { 
  padding-top: 80px; 
  bottom: 2rem;


                function playtrack() {
	var track = document.querySelector("#"+this.dataset.ref);
  // reads the "data-ref" attribute from the link, uses it to construct an id for the approrpriate audio track;

function triggertrack(element) {
 element.addEventListener('mouseover', playtrack, false);
var musictriggers = []"#equalizer a"));
// gets all the links, converts them from a nodelist into an array