Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div id="container">
  <div id="disc"></div>
  </div>
<audio id="sound" src="https://html5book.ru/examples/media/track.mp3" preload="auto" controls></audio>

              
            
!

CSS

              
                body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #F0EEED;
}
audio {
  display: none;
}
#container {
  height: 180px;
  width: 180px;
  background: rgba(255,255,255,.8);
  border-radius: 24px;
  position: relative;
  box-shadow: 0 0 20px 0 rgba(0,0,0,.15);
  transition: .5s linear;
}
#container:before {
  content: "\f001";
  font-family: FontAwesome;
  font-size: 70px;
  background: -webkit-linear-gradient(50deg, #FD9F85 50%, #E837C2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #FF7E24;
  position: absolute;
  line-height: 180px;
  left: 60px;
}
#container:hover #disc {
  margin-left: 110px;
  transform: rotate(360deg);
}
#disc {
  position: absolute;
  height: 140px;
  width: 140px;
  z-index: -1;
  border-radius: 50%;
  background: transparent;
  margin: 20px;
  transition: .9s linear;
  box-shadow:
    0 8px 6px -8px rgba(0,0,0,0.5),
    0 0 1px 1px rgba(0,0,0,0.5),
    0 0 0 1px #666 inset,
    0 0 0 2px #222 inset,
    0 30px 0px -29px #444 inset,
    0 -30px 0px -29px #444 inset,
    0 0 0 3px #333 inset,
    0 0 0 4px #222 inset,
    0 0 0 5px #333 inset,
    0 33px 0px -27px #444 inset,
    0 -33px 0px -27px #444 inset,
    0 0 0 6px #222 inset,
    0 0 0 7px #333 inset,
    0 0 0 8px #222 inset,
    0 34px 0px -25px #444 inset,
    0 -34px 0px -25px #444 inset,
    0 0 0 9px #333 inset,
    0 0 0 10px #222 inset,
    0 0 0 11px #333 inset,
    0 35px 0px -23px #444 inset,
    0 -35px 0px -23px #444 inset,
    0 0 0 12px #222 inset,
    0 0 0 13px #333 inset,
    0 0 0 14px #222 inset,
    0 36px 0px -21px #444 inset,
    0 -36px 0px -21px #444 inset,
    0 0 0 15px #333 inset,
    0 0 0 16px #222 inset,
    0 0 0 17px #333 inset,
    0 37px 0px -19px #444 inset,
    0 -37px 0px -19px #444 inset,
    0 0 0 18px #222 inset,
    0 0 0 19px #333 inset,
    0 0 0 20px #222 inset,
    0 38px 0px -17px #444 inset,
    0 -38px 0px -17px #444 inset,
    0 0 0 21px #333 inset,
    0 0 0 22px #222 inset,
    0 0 0 23px #333 inset,
    0 39px 0px -15px #444 inset, 
    0 -39px 0px -15px #444 inset, 
    0 0 0 24px #222 inset,
    0 0 0 25px #333 inset,  
    0 0 0 26px #222 inset,
    0 40px 0px -13px #444 inset,
    0 -40px 0px -13px #444 inset,
    0 0 0 27px #333 inset,
    0 0 0 28px #222 inset,
    0 0 0 29px #333 inset,
    0 41px 0px -11px #444 inset,
    0 -41px 0px -11px #444 inset,
    0 0 0 30px #222 inset,
    0 0 0 43px #333 inset,
    0 0 0 45px #AF2A10 inset,
    0 0 0 47px #333 inset,
    0 0 0 62px #AF2A10 inset,
    0 0 10px 78px rgba(0,0,0,0.5) inset;
}


              
            
!

JS

              
                var audio = $("#sound")[0];
$("#container").mouseenter(function() {
  audio.play();
}).mouseleave(function() {
  audio.pause();
});
              
            
!
999px

Console