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.

            
              // Inspired By this dribbble post https://dribbble.com/shots/2132841-Day-005-Music-Player

.player
	.image
		img.cover(src="http://fistintheair.com/wp-content/uploads/2016/12/quinn-xcii-straightjacket.jpg", alt="Cover")
		.filter
	.description
		p Quinn XCII
		h1 Straightjacket
	.buttons
		img.playButton(src="https://s29.postimg.org/5pit0vpk7/music_player_play_1.png", alt="PlayButton")
		img.pauseButton(src="https://s29.postimg.org/8nv0wtxef/pause_button.png", alt="pauseButton")
	.time
		p.timePlayed 1:27
		p.timeLeft 1:59
	.lines
		.songLength
		.lengthLeft
	.likeandfav
		.fa.fa-heart
		.fa.fa-star
            
          
!
            
              body
	background-color lighten(#FE5074,10%)
	height 1600px
.player
	height 600px
	width 450px
	position absolute
	top 10%
	left 50%
	transform translateX(-225px)
	background-color #111
	box-shadow 10px 10px 30px 0px rgba(0,0,0,0.5), -0px -0px 40px 0px rgba(0,0,0,0.4)
	.image
		position absolute
		left 0px
		top 0px
		.cover
			position absolute
			width 450px
			left 0px
			top 0px
		.filter
			position absolute
			width 450px
			height 450px
			background linear-gradient(transparent, #111)
	.description
		position absolute
		color #fff
		font-family Open Sans
		top 350px
		left 50px
		p
			margin 0
			color lighten(black, 40%)
		h1
			margin 5px 0px 0px 0px
	.buttons
		height 20px
		width 20px
		position absolute
		right 50px
		top 385px
		cursor pointer
		transition .2s
		.playButton,.pauseButton
			position absolute
			width 20px
			transition .2s
		.pauseButton
			opacity 0
	.buttons.active
		.playButton
			opacity 0
		.pauseButton
			opacity 1
	.time
		position absolute
		color #fff
		.timePlayed
			position absolute
			top 450px
			left 50px
			font-family Open Sans
		.timeLeft
			position absolute
			top 450px
			left 370px
			font-family Open Sans
			color lighten(black, 40%)
	.lines
		position absolute
		.songLength
			position absolute
			width 350px
			height 1px
			background-color lighten(black, 40%)
			top 500px
			left 50px
		.lengthLeft
			position absolute
			width 150px
			height 1px
			background-color #FE5074
			top 500px
			left 50px
	.likeandfav
		position absolute
		color lighten(black, 40%)
		.fa-heart
			position absolute
			top 530px
			left 50px
			font-size 25px
			transition .2s
		.fa-heart.active
			color #FE5074
		.fa-star
			position absolute
			top 530px
			left 375px
			font-size 25px
			transition .2s
		.fa-star.active
			color #FFDF00
            
          
!
            
              $(()=>{
	$('.buttons').on('click', ()=>{
		$('.buttons').toggleClass('active')
	})
	$('.fa-heart').on('click', ()=>{
		$('.fa-heart').toggleClass('active')
	})
	$('.fa-star').on('click', ()=>{
		$('.fa-star').toggleClass('active')
	})
})
            
          
!
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