cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

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.

            
              <div class="frame">
	<div class="ruby">
		<div class="bottom-left"></div>
		<div class="bottom-right"></div>
		<div class="bottom-middle"></div>
		<div class="top-left-left"></div>
		<div class="top-left"></div>
		<div class="top-middle"></div>
		<div class="top-right"><div class="flash"></div></div>
		<div class="top-right-right"></div>
	</div>
</div>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Open+Sans:700,300);

.frame {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 400px;
	height: 400px;
	margin-top: -200px;
	margin-left: -200px;
	border-radius: 2px;
	box-shadow: 1px 2px 10px 0px rgba(0,0,0,0.15);
	overflow: hidden;
	background: #FFC902;
	color: #fff;
	font-family: 'Open Sans', Helvetica, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.ruby {
	position: absolute;
	width: 192px;
	height: 126px;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	overflow: hidden;
	
	.bottom-left {
		position: absolute;
		z-index: 2;
		width: 0;
		height: 0;
		left: 0;
		bottom: 0;
		border-style: solid;
		border-width: 84px 0px 0 96px;
		border-color: #890505 transparent transparent transparent;
	}

	.bottom-right {
		position: absolute;
		z-index: 2;
		width: 0;
		height: 0;
		right: 0;
		bottom: 0;
		border-style: solid;
		border-width: 84px 96px 0 0px;
		border-color: #C81718 transparent transparent transparent;
	}

	.bottom-middle {
		position: absolute;
		z-index: 3;
		width: 0;
		height: 0;
		left: 54px;
		bottom: 0;
		border-style: solid;
		border-width: 84px 42px 0 42px;
		border-color: #A51012 transparent transparent transparent;
	}

	.top-left-left {
		position: absolute;
		z-index: 2;
		width: 0;
		height: 0;
		top: 0;
		left: 0;
		border-style: solid;
		border-width: 0 22px 42px 32px;
		border-color: transparent transparent #9E0707 transparent;
	}

	.top-left {
		position: absolute;
		z-index: 1;
		width: 64px;
		height: 42px;
		top: 0;
		left: 32px;
		background: #DC2323;
	}

	.top-middle {
		position: absolute;
		z-index: 2;
		width: 0;
		height: 0;
		top: 0;
		left: 54px;
		border-style: solid;
		border-width: 0 42px 42px 42px;
		border-color: transparent transparent #BC0E0E transparent;
	}

	.top-right {
		position: absolute;
		z-index: 1;
		width: 64px;
		height: 42px;
		top: 0;
		right: 32px;
		background: #F58181;
		overflow: hidden;
		
		.flash {
			position: absolute;
			width: 4px;
			height: 80px;
			top: -40px;
			left: 30px;
			background: #FFDFDF;
			transform: rotate(-44deg) translateX(-30px);
			animation: flash 3s linear infinite both;
			box-shadow: 0 0 5px 0 #FFDFDF;
		}
		
	}

	.top-right-right {
		position: absolute;
		z-index: 2;
		width: 0;
		height: 0;
		top: 0;
		right: 0;
		border-style: solid;
		border-width: 0 32px 42px 22px;
		border-color: transparent transparent #B90B0C transparent;
	}

}

@keyframes flash {
	0% {
		transform: rotate(-44deg) translateX(-30px);
	}
	10%, 100% {
		transform: rotate(-44deg) translateX(30px);
	}
}

            
          
!
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