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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <!-- Looks best in Chrome for now. 

Can't seem to style the progress bar on firefox properly yet. 

Cick play to animate the progress bar.

<div class="music-player">
    <img src="https://goo.gl/ly1Brx" alt="artwork" width="300" height="300">
    <div class="content">
      <div class="track"><i class="icon-music"></i>You Took Your Time (Kyle Hall Remix)</div>
      <div class="artist"><i class="icon-user"></i>Mount Kimbie</div>
      <div class="album"><i class="icon-cd"></i>CSFLY Remixes</div>
      <ul class="controls">
          <li><i class="icon-heart" ddata-tooltip="like"></i></li>
          <li><i class="icon-shuffle" ddata-tooltip="shuffle"></i></li>
          <li><i class="icon-cw" ddata-tooltip="repeat"></i></li>
      <progress value="0" max="100"><div class="tracker active"></div></progress>
      <span class=""></span><span class="" style="float:right;">4:42</span>
      <ul class="play-controls">
        <li><i class="icon-first"></i></li>
        <li><i class="icon-previous"></i></li>
        <li><i class="icon-play"></i></li>
        <li><i class="icon-next"></i></li>
        <li><i class="icon-last"></i></li>
              @import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400);
@import url(https://markmurray.co/codepen/style.css); 

*,  *:before, *:after {margin: 0; padding: 0;box-sizing: border-box;
html, body {height: 100%;width: 100%;background: #34AADC;-webkit-transform: translateZ(0)}
ul, ol     {list-style-type: none;}
a,a:visited,a:focus {text-decoration: inherit;font-weight: inherit;color: inherit;}

img {display:block;max-width: 100%;height: auto;}

i {
  color: #3a3a3a;
  margin-right: 10px;
  font-size: 0.9em;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.7);
  position: relative;

.music-player {
   width: 300px;
   font-family: 'Open Sans', sans-serif;
   box-shadow: 0 10px 40px 5px rgba(0,0,0,0.3);
   border-radius: 10px;
   background: #eaeaea;
   position: absolute;
   top: 50%; left: 50%;
           transform: translate(-50%, -50%);
   -webkit-transform: translate(-50%, -200%);
           transition: all 0.7s ease;
       -ms-transition: all 0.7s ease;
      -moz-transition: all 0.7s ease;
        -o-transition: all 0.7s ease;
   -webkit-transition: all 0.7s ease;

.music-player .content {
  padding: 20px 20px 5px;
  font-size: 0.8em;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.7);
  line-height: 2;
  position: relative;
  text-overflow: ellipsis;

.track, .artist, .album {
    text-overflow: ellipsis;
    white-space: nowrap;

.music-player img {
  border-radius: 8px 8px 0 0;
  margin-top: -1px;
  transition: all 0.5s ease;

.music-player img:hover {
  -webkit-filter: grayscale();
          filter: grayscale();
  cursor: pointer;

.music-player .artist {
  font-weight: 400;
  font-size: 1.1em;

.music-player .track {
  font-weight: 300;

  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: #d6d6d6;
  width: 100%;
  position: relative;

progress, ::-webkit-progress-value {
  background: #10d7af;

::-moz-progress-value {
  background: #10d7af;

.music-player ul.play-controls{ 
    text-align: center; 
    margin: 10px 0; 
    cursor: pointer;
    font-size: 1.9em;
    margin: 0 10px; 
.music-player ul li   { display: inline; margin: 0 2px; }
.music-player ul li i:hover { color: #10d7af; }

.music-player ul.controls { 
  text-align: right; 
  position: absolute;
  right:10px; top: 72px;
  font-size: 1.3em; 

.music-player ul.controls li { margin: 0 1px; }
.music-player ul.controls li i { color:#aaa; }
.music-player ul.controls li i:hover {
  cursor: pointer;
  color: #10d7af;

.green {
  color: #10d7af!important;

i[data-tooltip]:hover:before {
  content: "";
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:5px solid white;

i[data-tooltip]:hover:after {
  padding:2px 6px;
  text-shadow:0 1px rgba(255,255,255,.7);
  box-shadow:-1px 5px 15px rgba(0,0,0,0.6);

                  var msecsPerUpdate = 1000/60; // 60fps
    var progress =  $('progress');
    var duration = 5;  //seconds
    var interval = progress.attr('max')/(duration*1000/msecsPerUpdate);

    function play(){
            progress.val(progress.val() + interval);
            if (progress.val() + interval < progress.attr('max')){
               setTimeout(play, msecsPerUpdate);
            } else {

// Animate player on dom ready
$('.music-player').css('transform', 'translate(-50%, -50%)');

$('.icon-play').click(function(e) {


// Set progress bar to 0
$('.icon-previous, .icon-first').click(function(){
    $('progress').attr("value", "0");

// Highlight controls on click
$('ul.controls li i').click(function() {
  else {

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.