cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

            
              <div class="container">

    <div class="menubar">
        <span class="menu--cross"></span>
        <span class="menu--heart"></span>
        <span class="menu--more"></span>
    </div>
    <div class="albumart"></div>
    <div class="progress">
        <span class="progress__start">0:00</span>
        <span class="progress__now"></span>
        <span class="progress__end">3:22</span>
    </div>
    <div class="controls">
        <div class="controls__icon--loop"><span></span></div>
        <div class="controls__icon--prev"><span></span></div>
        <div class="controls__icon--play"><span></span></div>
        <div class="controls__icon--next"><span></span></div>
        <div class="controls__icon--shuffle"><span></span></div>
    </div>
    <div class="list">
        <div class="song">
            <span class="song__icon"></span>
            <div class="song__name">
                <p class="song__title">Pillowtalk</p>
                <p class="song__subtitle">ZAYN</p>
            </div>
            <span class="song__menu"></span>
        </div>
        <div class="song">
            <span class="song__icon--next">Next</span>
            <div class="song__name">
                <p class="song__title">Don't Let Me Down</p>
                <p class="song__subtitle">The Chainsmokers</p>
            </div>
            <span class="song__menu"></span>
        </div>
    </div>

</div>



<a id="other_link" target="_blank" href="https://codepen.io/bharatramnani94/pen/aZOjZP">View the <span>NEON</span> version here</a>
            
          
!
            
              *, *:before, *:after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
}

.container {
    width: 320px;
    height:568px;
    background: #eee;
    margin: auto;
    position: relative;
    top: calc(50% - 284px);
    overflow: hidden;
    font-family: sans-serif;
    box-shadow: 12px 12px 20px rgba(0,0,0,0.2);
}

.menubar {
    position: absolute;
    top: 0;
    height: 48px;
    width: 100%;
    display: flex;

    %menu {
        display: inline-block;
        width: 24px;
        height: 24px;
        margin-top: 12px;
        background-color: white;
        color: blue;
    }

    .menu--cross {
        @extend %menu;
        margin-left: 16px;
        -webkit-mask-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158295/Public Media/004-cancel-music.svg');
        mask-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158295/Public Media/004-cancel-music.svg');
    }
    .menu--heart {
        @extend %menu;
        margin-left: auto;
        -webkit-mask-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158292/Public Media/005-web.svg');
        mask-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158292/Public Media/005-web.svg');
    }
    .menu--more {
        @extend %menu;
        margin-left: 16px;
        margin-right: 16px;
        width: 20px;
        height: 20px;
        margin-top: 14px;
        -webkit-mask-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158728/Public Media/dots.svg');        
        mask-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158728/Public Media/dots.svg');        
    }
}

.albumart {
    height: 332px;
    background-color: #333;
    background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517156190/Public%20Media/Zayn-Malik-number-one-1.png');
    background-size: cover;
    background-position: center;
}

.progress {
    height: 20px;
    background-color: rgba(255,255,255,0.6);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-top: -20px;
    cursor: pointer;

    .progress__start {
        margin-left: 8px;
    }

    .progress__now {
        background-color: white;
        width: 4px;
        height: 100%;
        margin-left: 20px;
    }

    .progress__end {
        margin-left: auto;
        margin-right: 8px;
    }

}

.controls {
    height: 120px;
    width: 80%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;


    div {
        cursor: pointer;
    }

    span {
        display: inline-block;
        width: 24px;
        height: 24px;
        background-repeat: no-repeat;
        transition: 0.2s;

        &:hover {
            opacity: 1 !important;
        }
    }

    .controls__icon--loop span {
        opacity: 0.15;
        background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158292/Public Media/008-arrows-1.svg');
    }

    .controls__icon--prev span {
        opacity: 0.5;
        background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158292/Public Media/002-track.svg');
        margin-left: 22px;
    }

    .controls__icon--play {

        width: 56px;
        height: 56px;
        background-color: white;
        border-radius: 50%;
        box-shadow: 0 3px 2px rgba(0,0,0,0.2);

        span {
            background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158295/Public Media/010-play-button-sing.svg');
            position: relative;
            left: calc(50% - 12px);
            top: calc(50% - 12px);
        }

        &:hover {
            transition: all 0.2s ease;
            transform: translateY(-4px);
            box-shadow: 0 8px 4px -2px rgba(0,0,0,0.2);
        }
  
    }

    .controls__icon--next span {
        opacity: 0.5;
        background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158292/Public Media/001-track-1.svg');
        margin-right: 22px;
    }

    .controls__icon--shuffle span {
        opacity: 0.15;
        background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158296/Public Media/009-arrows.svg');
    }


}


.list {
    position: relative;
    width: 90%;
    height: 100%;
    left: 5%;
    background-color: white;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);

    .song {
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #eee;
        cursor: pointer;

        &:hover {
            background-color: #f5f5f5;
        }
    }

    .song__icon {
        background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158292/Public Media/007-musical-note.svg');
        width: 20px;
        height: 20px;
        opacity: 0.5;
        margin: 20px;
    }

    .song__icon--next {
        font-size: 0.7rem;
        opacity: 0.5;
        margin-left: 18px;
        margin-right: 18px;
    }

    .song__name {
        flex-grow: 1;

        .song__title {
            font-size: 0.9rem;
        }
        .song__subtitle {
            font-size: 0.7rem;
            margin-top: 4px;
            color: #555;
        }
    }

    .song__menu {
        background-image: url('https://res.cloudinary.com/persevere/image/upload/v1517158728/Public Media/dots.svg');
        width: 20px;
        height: 20px;
        opacity: 0.5;
        margin: 20px;
    }
}



#other_link {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #FF47AD;
  color: white;
  font-size: 1.4em;
  font-family: sans-serif;
  padding: 8px;
  text-decoration: none;
  text-align: center;
  
  span {
    text-decoration: underline;
  }
}
            
          
!
999px
🕑 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.
Loading ..................

Console