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.

            
              body { background-color: #181818; }

/* Yellow triangle */
.triangle {
	/* Horizontal and vertical centering  */
	position: absolute;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%,-50%);
			-ms-transform: translate(-50%,-50%);
					transform: translate(-50%,-50%);
	/* Yellow triangle style */
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 22px 38.1px 22px; /* Equilateral triangle -> big width = small width X 1.732 */
	border-color: transparent transparent #fff000; 
	cursor: pointer; /* Activate the cursor */
	/* Hover transition */
	-webkit-transition: .4s ease-in-out;
        	transition: .4s ease-in-out;
}

/* Hover style */
.triangle:hover {
	/* change the size of the yellow triangle */
	border-width: 0 62.5px 108.25px 62.5px;
	/* CSS animation sequence */
	-webkit-animation: 0.075s linear infinite shock alternate;
					animation: 0.075s linear infinite shock alternate;
	/* Hover transition */
	-webkit-transition: .08s linear;
        	transition: .08s linear;
}

/* Configure the appearance of the animation */
@-webkit-keyframes shock {
	25% {
		border-color: transparent transparent #fffef4;
		-webkit-transform: translate(-50%,-51%);
	    	-ms-transform: translate(-50%,-51%);
						transform: translate(-50%,-51%);
	}
	50% {
		-webkit-transform: translate(-51%,-50%) rotate(0.2deg);
	    	-ms-transform: translate(-51%,-50%) rotate(0.2deg);
	        	transform: translate(-51%,-50%) rotate(0.2deg);
	}
	75% {
		border-color: transparent transparent #fffef4;
		-webkit-transform: translate(-50%,-49%);
	    	-ms-transform: translate(-50%,-49%);
						transform: translate(-50%,-49%);
	}
	100% {
		-webkit-transform: translate(-49%,-50%) rotate(-0.2deg);
	    	-ms-transform: translate(-49%,-50%) rotate(-0.2deg);
	        	transform: translate(-49%,-50%) rotate(-0.2deg);
	}
}
@keyframes shock {
	25% {
		border-color: transparent transparent #fffef4;
		-webkit-transform: translate(-50%,-51%);
	    	-ms-transform: translate(-50%,-51%);
						transform: translate(-50%,-51%);
	}
	50% {
		-webkit-transform: translate(-51%,-50%) rotate(0.2deg);
	    	-ms-transform: translate(-51%,-50%) rotate(0.2deg);
	        	transform: translate(-51%,-50%) rotate(0.2deg);
	}
	75% {
		border-color: transparent transparent #fffef4;
		-webkit-transform: translate(-50%,-49%);
	    	-ms-transform: translate(-50%,-49%);
						transform: translate(-50%,-49%);
	}
	100% {
		-webkit-transform: translate(-49%,-50%) rotate(-0.2deg);
	    	-ms-transform: translate(-49%,-50%) rotate(-0.2deg);
	        	transform: translate(-49%,-50%) rotate(-0.2deg);
	}
}
            
          
!
            
              // For this, we don't need Javascript!
// ^-^ <3 CSS3
            
          
!
999px
Loading ..................

Console