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.

Quick-add: + add another resource

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.

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.

            
              <!-- jQuery file -->
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>

<!-- Star -->
<div class="clase-m"></div>

<!-- Audio file -->
<audio id="sonification" preload="auto">
	<source src="http://www.arinspunk.gal/wp-content/uploads/2016/09/arinspunk-som-estrela.mp3" type="audio/mpeg">
</audio>
            
          
!
            
              body { background-color: #0f0f0f; }

/* Red dwarf  */
.clase-m {
	/* Horizontal and vertical centering  */
	position: absolute;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%,-50%);
			-ms-transform: translate(-50%,-50%);
					transform: translate(-50%,-50%);
	/* Red point style */
	width: 40px;
	height: 40px;
	border-radius: 100%; /* Transform span into a circle  */
	background-color: #ff0000;
	box-shadow: 0 0 30px 0px #ff0000;
	cursor: pointer; /* Activate the cursor */
	/* CSS animation sequence */
	-webkit-animation: 8s linear infinite c-m;
			    animation: 8s linear infinite c-m;
}

/* Configure the appearance of the animation */
@-webkit-keyframes c-m {
	0% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	10% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	15% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	25% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	30% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	40% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	45% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	55% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	60% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	70% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	75% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	85% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	90% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	91% {
		background-color: #fff;
		box-shadow: -20px -20px 350px 150px yellow;
	}
	93% {
		background-color: #fff;
		box-shadow: 0 0 350px 100px yellow;
	}
	95% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
}
@keyframes c-m {
	0% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	10% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	15% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	25% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	30% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	40% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	45% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	55% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	60% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	70% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	75% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	85% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
	90% {
		background-color: #ff0000;
		box-shadow: 0 0 30px 0px #ff0000;
	}
	91% {
		background-color: #fff;
		box-shadow: 0 0 350px 100px #fff;
	}
	93% {
		background-color: #ffae00;
		box-shadow: 30px 30px 350px 150px #ffae00;
	}
	95% {
		background-color: #e50000;
		box-shadow: 0 0 22px 0px #e50000;
	}
}
            
          
!
            
              // jQuery
// Play/Pause audio on :hover
var star = $("#sonification")[0];
$('.clase-m').mouseover(function(){
	star.play();
}).mouseout(function(){
	star.pause();
});

            
          
!
999px
Loading ..................

Console