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.

            
              <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <link href="https://fonts.googleapis.com/css?family=Barrio" rel="stylesheet">  
  </head>  
<body>
    <div class="flip-container" ontouchstart="this.classList.toggle('hover');">
        <div class="main flipper">
            <div class="front">
        <h1 class="top">Happy Valentines Day</h1>
            <div class="layer">
                    <div class="piece-outer">
                        <div class="piece shadow b1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow a1 "></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow b1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow a1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow f1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow f1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow f1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow f1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow e1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow d1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow e1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow d1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow f1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow f1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow e1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow d1"></div>
                    </div>
                      <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
            </div>
            <div class="layer">
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece   g1"></div>
                    </div>
                    <div class="piece-outer half">
                        <div class="piece   g1 "></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow c1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow c1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow c1"></div>
                    </div>
                    <div class="piece-outer half">
                        <div class="piece   g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow c1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow c1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer half">
                        <div class="piece   g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow c1"></div>
                    </div>
                      <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer half">
                        <div class="piece   g1"></div>
                    </div>
            </div>
            <div class="layer">
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer half">
                        <div class="piece   g1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece shadow f1"></div>
                    </div>
                    <div class="piece-outer">
                        <div class="piece  g1"></div>
                    </div>
                    <div class="piece-outer half">
                        <div class="piece   g1"></div>
                    </div>
                </div>
        </div>
    <div class="back">
            <h2>From Realise </h2>
        </div>
        </div>
    </div>
</body>
</html>
            
          
!
            
              
   body {
            background-color: dimgray;
        }

        .piece {
            background-color: #bf1522;
            width: 100%;
            height: 130px;
            padding: 0px;
        }

        .half {
            width: 11% !important;
        }

        .layer {
            position: absolute;
             width: 100%;
             text-align: center;
        }

        .piece-outer {
            position: relative;
            display: inline-block;
            background-color: antiquewhite;
            opacity: 0.5;
            width:22%;
        }


        .shadow {
            -moz-box-shadow: 0px 8px 8px #000;
            -webkit-box-shadow: 0px 8px 8px #000;
            box-shadow: 0px 8px 8px #000;
        }

        .center {
        }

        .top {
            padding: 25px;
            padding-bottom:0px;
        }

        .bottom {
            padding-top: 1600px;
        }

         .main{
               height:840px;
              margin: 0 auto;
                position: relative;
                    max-width: 800px;
        }

        h1, h2 {
            text-align: center;
            font-family: 'Barrio', cursive;
            color: #cf7f85;
            font-size: 3em;
        }

        h2{
                margin-top: 50%;
        }

        @-webkit-keyframes loading {
            0% {
                background-color: #bf1522;
            }

            50% {
                background-color: #c4404a;
            }

            100% {
                background-color: #bf1522;
            }
        }

        @-moz-keyframes loading {
            0% {
                background-color: #bf1522;
            }

            50% {
                background-color: #c4404a;
            }

            100% {
                background-color: #bf1522;
            }
        }

        @keyframes loading {
            0% {
                background-color: #bf1522;
            }

            50% {
                background-color: #c4404a;
            }

            100% {
                background-color: #bf1522;
            }
        }

        @media only screen and (max-width: 768px) {
            /* For mobile phones: */
           .piece {
            height: 100px;
        }
        
        .main{
               height:750px;
                margin-left: 10%;
                margin-right: 10%;
                    min-width: 292px;
        }
        }


        .a1 {
            -webkit-animation: loading 1.3s 0.9s infinite;
            -moz-animation: loading 1.3s 0.9s infinite;
            -webkit-clip-path: polygon(0 0, 0% 100%, 100% 100%);
            clip-path: polygon(0 0, 0% 100%, 100% 100%);
        }

        .b1 {
            -webkit-animation: loading 0.9s 1.5s infinite;
            -moz-animation: loading 0.9s 1.5s infinite;
            -webkit-clip-path: polygon(0 100%, 100% 0, 100% 100%);
            clip-path: polygon(0 100%, 100% 0, 100% 100%);
        }

        .c1 {
            -webkit-animation: loading 1.4s 0.9s infinite;
            -moz-animation: loading 1.4s 0.9s infinite;
            -webkit-clip-path: polygon(0 100%, 50% 0, 100% 100%);
            clip-path: polygon(0 100%, 50% 0, 100% 100%);
        }

        .d1 {
            -webkit-clip-path: polygon(0 100%, 50% 0, 0 0);
            clip-path: polygon(0 100%, 50% 0, 0 0);
            -webkit-animation: loading 1.2s 0.7s infinite;
            -moz-animation: loading 1.2s 0.7s infinite;
        }

        .e1 {
            -webkit-clip-path: polygon(100% 0, 50% 0, 100% 100%);
            clip-path: polygon(100% 0, 50% 0, 100% 100%);
            -webkit-animation: loading 1.1s 0.9s infinite;
            -moz-animation: loading 1.1s 0.9s infinite;
        }

        .f1 {
            -webkit-clip-path: polygon(100% 0, 0 0, 50% 100%);
            clip-path: polygon(100% 0, 0 0, 50% 100%);
            -webkit-animation: loading 1s 0.9s infinite;
            -moz-animation: loading 1s 0.9s infinite;
        }

        .g1 {
            background-color: transparent;
        }

        .h1 {
            -webkit-clip-path: polygon(50% 0, 0 0, 50% 100%);
            clip-path: polygon(50% 0, 0 0, 50% 100%);
            -webkit-animation: loading 1s 0.9s infinite;
            -moz-animation: loading 1s 0.9s infinite;
        }


/*Taken from https://davidwalsh.name/css-flip */
/* entire container, keeps perspective */
.flip-container {
	perspective: 1000px;
        padding-top: 30px;
}
	/* flip the pane when hovered */
	.flip-container:hover .flipper, .flip-container.hover .flipper {
		transform: rotateY(180deg);
	}

.flip-container, .front, .back {
	width: 100%;
	height:  860px;
}

/* flip speed goes here */
.flipper {
	transition: 0.6s;
	transform-style: preserve-3d;

	position: relative;
}

/* hide back of pane during swap */
.front, .back {
	backface-visibility: hidden;
    background-color: antiquewhite;
	position: absolute;
	top: 0;
	left: 0;
}

/* front pane, placed above back */
.front {
	z-index: 2;
	/* for firefox 31 */
	transform: rotateY(0deg);
}

/* back, initially hidden pane */
.back {
	transform: rotateY(180deg);
}
            
          
!
999px
Loading ..................

Console