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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <body>

<div class="contain">
	<div class="container">
	
		<div class="music-player">
			<div class="cover">
				<img src="https://www.grandvincent-marion.fr/_codepen/kygo.png" alt="">
				
			</div>
			<div class="titre">
				<h3>Kygo</h3>
				<h1>Stole the show</h1>
			</div>
			<div class="lecteur">
				<audio style="width: 100%;" class="fc-media fc-audio"><source src="https://www.grandvincent-marion.fr/_codepen/kygo-stole-the-show.mp3" type="audio/mp3"/></audio>
			</div>
		</div>
	</div>
</div>

</body>
            
          
!
            
              html {
    background: #f2f2f2;
}

body {
    margin: 0;
    font-family: "Raleway",sans-serif;
}

h1 {
    margin: 0;
    font-size: 33px;
    color: #fff;
}

h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    color: #ccc;
}

.container {
    display: block;
    width: 100%;
    height: 750px;
    margin: auto;
    overflow: hidden;
    background-image: url("https://www.grandvincent-marion.fr/_codepen/bg-music-player.jpg");
    background-repeat: repeat;
    background-size: cover;
}

.music-player {
    display: block;
    position: relative;
    width: 400px;
    height: 570px;
    margin: auto;
    margin-top: 6%;
    border-radius: 0 0 10px 10px;
    background: transparent linear-gradient(to bottom,rgba(10,11,31,0.9) 50%,rgb(10,11,31) 70%) repeat scroll 0 0;
    box-shadow: 1px 10px 20px 5px #222;
}

.cover {
    float: left;
    width: 100%;
    height: 66%;
}

.cover img {
    display: block;
    position: absolute;
    top: 8%;
    left: 14%;
    width: 70%;
    margin: auto;
    text-align: center;
}

.titre {
    float: left;
    width: 100%;
    padding: 0 10%;
}

.lecteur {
    float: left;
    width: 100%;
}

.mejs-controls {
    padding: 0 10%;
}

.mejs-container {
    position: relative;
}

.mejs-playpause-button {
    position: absolute !important;
    right: 8%;
    bottom: 95%;
}

.mejs-playpause-button button {
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    font-family: FontAwesome;
    font-size: 23px;
    color: #cf5da3;
    background: transparent;
}

.mejs-volume-button button {
    display: block;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    font-family: FontAwesome;
    font-size: 20px;
    color: #5bbb95;
    background: transparent;
}

.mejs-play button:before {
    content: "\f04b";
}

.mejs-controls .mejs-pause button:before {
    content: "\f04c";
}

.mejs-controls .mejs-stop button:before {
    content: "\f04d";
}

.mejs-controls .mejs-mute button:before {
    content: "\f028";
}

.mejs-controls .mejs-unmute button:before {
    content: "\f026";
}

.mejs-container .mejs-controls .mejs-time {
    width: 100%;
    margin-top: 7%;
    margin-bottom: 3%;
    color: #fff;
}

.mejs-controls .mejs-time-rail .mejs-time-loaded {
    background: rgba(255,255,255,0.2);
}

.mejs-container .mejs-controls .mejs-time span {
    font-size: 15px;
}

.mejs-controls div.mejs-time-rail {
}

.mejs-container .mejs-controls div {
    display: block;
    float: left;
    position: relative;
    width: 40px;
}

span.mejs-duration {
    float: right;
    text-align: right;
    color: #ccc;
}

span.mejs-currenttime {
    font-weight: 700;
}

.mejs-controls .mejs-time-rail span {
    position: absolute;
    top: 0;
    width: 100%;
    height: 3px;
    border-radius: 50px;
    cursor: pointer;
}

.mejs-controls .mejs-time-rail .mejs-time-current {
    background: #5BBB95 none repeat scroll 0 0;
}

.mejs-controls .mejs-volume-button {
    position: relative;
    position: absolute !important;
    top: 70px;
    right: 25%;
    width: 40px;
    height: 40px;
}

.mejs-controls div.mejs-horizontal-volume-slider {
    display: block;
    position: absolute !important;
    position: relative;
    top: 70px;
    right: 10%;
    width: 60px;
    height: 3px;
    margin-top: 20px;
    border-radius: 50px;
    line-height: 11px;
}

.mejs-controls .mejs-time-rail .mejs-time-float {
    display: none;
    top: -40px;
    width: 40px;
    height: 25px;
    margin-left: -18px;
    text-align: center;
    font-size: 10px;
    background: #fff;
}

.mejs-controls .mejs-time-rail .mejs-time-float-current {
    display: block;
    position: relative;
    top: 0;
    margin: 0;
    line-height: 26px;
    color: #100d28;
}

.mejs-controls .mejs-time-rail .mejs-time-float-corner {
    top: auto;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 0;
    margin-left: -6px;
    border-top: 6px solid #fff;
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
}

.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,
.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
}

.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
    background: #fff;
}
            
          
!
            
              var a = {

    extend : function() {},
    addons : function() {},
    init : function() {
        var $that = this;
        $(function() {
			$that.components.media();
        });
    },
    components: {
        media : function(target) {
            var media = $('audio.fc-media', (target !== undefined) ? target : 'body');
            if (media.length) {
                media.mediaelementplayer({
                    audioHeight              : 40,
                    features                 : ['playpause', 'current', 'duration', 'progress', 'volume', 'tracks', 'fullscreen' ],
                    alwaysShowControls       : true,
                    timeAndDurationSeparator : '<span>  </span>',
                    iPadUseNativeControls: true,
                    iPhoneUseNativeControls: true,
                    AndroidUseNativeControls: true
                });
            }
        },
    },
  
};

a.init();
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console