Pen Settings



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


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.


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.


                <nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        <a href=""class="navbar-brand">Wayne Burris</a>
      <div id="navbar" class="navbar-collapse collapse">
        <ul class="nav navbar-nav navbar-right">
          <li><a href=""><i class="fa fa-free-code-camp fa-lg" aria-hidden="true"></i></a></li>
          <li><a href=""><i class="fa fa-github-square fa-lg" aria-hidden="true"></i></a></li>
          <li><a href=""><i class="fa fa-linkedin-square fa-lg" aria-hidden="true"></i></a></li>
          <li><a href=""><i class="fa fa-codepen fa-lg" aria-hidden="true"></i></a></li>
      <!--/.nav-collapse -->
</nav> <!--   end of navbar -->
<div id="wrapper">
<div class="keys">
    <div data-key="65" class="key">
      <span class="sound">clap</span>
    <div data-key="83" class="key">
      <span class="sound">hihat</span>
    <div data-key="68" class="key">
      <span class="sound">kick</span>
    <div data-key="70" class="key">
      <span class="sound">openhat</span>
    <div data-key="71" class="key">
      <span class="sound">boom</span>
    <div data-key="72" class="key">
      <span class="sound">ride</span>
    <div data-key="74" class="key">
      <span class="sound">snare</span>
    <div data-key="75" class="key">
      <span class="sound">tom</span>
    <div data-key="76" class="key">
      <span class="sound">tink</span>
</div> <!-- end of wrapper -->
  <audio data-key="65" src=""></audio>
  <audio data-key="83" src=""></audio>
  <audio data-key="68" src=""></audio>
  <audio data-key="70" src=""></audio>
  <audio data-key="71" src=""></audio>
  <audio data-key="72" src=""></audio>
  <audio data-key="74" src=""></audio>
  <audio data-key="75" src=""></audio>
  <audio data-key="76" src=""></audio>



                #wrapper {
  font-size: 10px;
  background: url( bottom center;
  background-size: cover;
body,html {
  margin: 0;
  padding: 0;
  font-family: sans-serif;

.keys {
  display: flex;
  flex: 1;
  min-height: 100vh;
  align-items: center;
  justify-content: center;

.key {
  border: .4rem solid black;
  border-radius: .5rem;
  margin: 1rem;
  font-size: 1.5rem;
  padding: 1rem .5rem;
  transition: all .07s ease;
  width: 10rem;
  text-align: center;
  color: white;
  background: rgba(0,0,0,0.4);
  text-shadow: 0 0 .5rem black;

.playing {
  transform: scale(1.3);
  border-color: blue;
  box-shadow: 0 0 1rem blue;

kbd {
  display: block;
  font-size: 4rem;

.sound {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .1rem;
  color: #ffc600;


                function playSound(e) {
    const audio = document.querySelector(`audio[data-key="${e.keyCode}"]`);
    const key = document.querySelector(`.key[data-key="${e.keyCode}"]`);
    if(!audio) return; //stops the funciton from running
    audio.currentTime = 0; //goes to beginning of audio clip;
function removeTransition(e) {
  if(e.propertyName !== 'transform') return;
const keys = document.querySelectorAll('.key');
keys.forEach(key => key.addEventListener('transitionend',removeTransition)); // skip it if it's not a transform
window.addEventListener('keydown', playSound);