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.

              <div id="container">
<div class="player">
<video src="http://installationspace.com/spaces/shard/v1/media/wavves_trim_4sec-360p.mp4" class="video1" width="720" height="360" loop autoplay preload="true"></video>
</div><!-- end player -->
</div><!-- end content -->
              /* CSS3 Video Shard
Author: Steve Belovarich
Site: stephenbelovarich.com


As seen on installationspace.com, this example is based off one provided by Apple at WWDC 2011. 

#container { 

-webkit-perspective: 1600 !important; /* The container MUST use the perspective property */
perspective: 1600 !important; /* The container MUST use the perspective property */
background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#fff));
	z-index: 45 !important;
  height: 100%;

.player {
 width: 720px;
 height: 360px;
  left: 50%;
z-index: 46 !important; /* must be higher z-iindex than container */
border: none;
transform-origin:50% 50%; /* rotate center */
animation: rotate 12s infinite; /* set animation */
-webkit-box-reflect:below 1px -webkit-gradient(linear, left top, left bottom, from(transparent), /* only in chrome, safari should work but doesn't */
color-stop(0.5, transparent), to(white)); /* generate reflection */

.player .video1 {
  /* webkit only */
-webkit-mask-box-image: url('http://installationspace.com/spaces/shard/v1/media/broken_glass.svg');  /* load a SVG to use as the shard mask. Created vector art in Adobe Illustrator and then exported as SVG. */


/* Keyframe Animation */
@keyframes rotate {
0% { transform: rotateY(0deg);	}
10% { transform: rotateY(0deg); }
25% { transform: rotateY(180deg); }
50% {  transform: rotateY(360deg); }
75% { transform: rotateY(180deg);}
90% { transform: rotateY(0deg);}
100% {  transform: rotateY(0deg); }
Loading ..................