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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="container">
  <div class="flip-container">
      <div class="inner-flip-container">
        <div class="front">
          <svg class="tree" viewBox="0 0 283 304"><use xmlns:xlink="//www.w3.org/1999/xlink" xlink:href="#tree"></use></svg>
        </div>
          <div class="back">
            <svg class="present" viewBox="0 0 225 225"><use xmlns:xlink="//www.w3.org/1999/xlink" xlink:href="#present"></use></svg>
          </div>
      </div>
  </div>
</div>

<div class="invisible">
  <svg id="tree" version="1.0" xmlns="http://www.w3.org/2000/svg"
   width="226.000000pt" height="243.000000pt" viewBox="0 0 226.000000 243.000000"
   preserveAspectRatio="xMidYMid meet">
  <metadata>
  Created by potrace 1.13, written by Peter Selinger 2001-2015
  </metadata>
  <g transform="translate(0.000000,243.000000) scale(0.100000,-0.100000)"
  fill="#000000" stroke="none">
  <path d="M1126 2315 l-17 -55 -62 0 -62 -1 27 -23 c15 -13 37 -31 49 -39 21
  -15 21 -16 4 -67 -9 -28 -15 -53 -13 -56 3 -2 22 9 44 26 21 16 44 29 49 29 6
  0 28 -13 49 -29 22 -17 41 -28 44 -25 2 2 -3 25 -12 51 -18 53 -15 61 43 96
  l36 23 -59 5 -59 5 -19 54 c-10 30 -19 56 -21 57 -2 2 -11 -21 -21 -51z"/>
  <path d="M1116 2055 c-65 -144 -199 -349 -332 -510 -84 -103 -249 -269 -317
  -320 -21 -16 -34 -32 -29 -37 4 -4 48 -21 97 -36 l88 -27 -105 -106 c-58 -58
  -140 -134 -184 -169 -43 -34 -80 -64 -82 -65 -2 -2 34 -15 80 -30 46 -15 86
  -31 91 -34 10 -10 -175 -188 -278 -270 -44 -35 -81 -67 -83 -70 -6 -16 316
  -109 503 -145 93 -18 302 -46 346 -46 l29 0 0 -65 0 -65 190 0 189 0 3 63 3
  62 95 7 c131 10 295 35 424 64 137 30 356 94 356 104 0 4 -28 29 -62 56 -35
  27 -119 104 -188 170 l-125 122 93 27 c50 16 92 31 92 34 0 4 -23 25 -52 46
  -58 44 -298 282 -298 296 0 4 32 18 72 30 132 39 127 32 61 88 -215 180 -444
  476 -584 756 -34 66 -62 121 -64 123 -2 2 -14 -22 -29 -53z m341 -705 l38 0
  -32 -25 c-32 -25 -32 -26 -18 -65 8 -22 13 -40 11 -40 -1 0 -17 11 -36 25
  l-33 25 -35 -27 -35 -26 6 24 c18 63 18 64 -15 87 l-33 22 42 0 c41 0 43 1 55
  41 l12 42 18 -42 c16 -38 20 -41 55 -41z m-364 -40 c68 -1 69 1 -8 -55 l-28
  -21 16 -49 c10 -27 17 -53 17 -58 0 -5 -22 7 -48 26 l-49 35 -46 -34 c-26 -19
  -49 -34 -51 -34 -3 0 4 25 14 56 22 64 25 58 -50 107 l-35 22 66 3 c63 3 67 4
  72 30 3 15 11 41 17 57 l12 30 20 -57 20 -58 61 0z m183 -275 l17 -54 64 -3
  64 -3 -50 -37 -50 -38 19 -56 c11 -32 20 -59 20 -61 0 -1 -22 13 -49 32 -26
  19 -52 35 -56 35 -4 0 -25 -14 -47 -31 -21 -17 -41 -29 -44 -27 -2 3 3 24 11
  48 8 23 15 48 15 54 0 6 -23 27 -51 46 l-52 35 66 3 66 3 17 54 c10 30 19 55
  20 55 2 0 11 -25 20 -55z m434 -127 c8 -25 15 -28 52 -28 l43 0 -33 -27 c-35
  -26 -37 -42 -16 -97 6 -16 2 -15 -31 7 -37 25 -39 26 -64 8 -50 -35 -51 -34
  -35 11 14 40 14 44 -3 55 -61 41 -61 42 -12 43 l46 0 14 47 c13 49 14 49 39
  -19z m-1121 -428 l56 -1 -25 -20 c-14 -12 -33 -27 -44 -34 -17 -13 -18 -16 -2
  -61 9 -26 16 -49 16 -51 0 -2 -20 10 -45 27 l-45 31 -42 -33 c-40 -32 -41 -32
  -34 -8 22 77 20 84 -25 115 l-43 30 57 3 c55 3 56 4 68 40 19 59 22 60 38 9
  l15 -47 55 0z m640 -60 l46 0 -33 -27 c-35 -26 -37 -42 -16 -97 6 -16 4 -17
  -12 -7 -10 6 -28 18 -40 26 -18 14 -23 13 -54 -10 -18 -14 -35 -23 -36 -22 -2
  2 2 20 8 41 12 37 11 39 -22 67 l-35 28 46 1 46 0 14 48 13 47 15 -47 15 -48
  45 0z"/>
  </g>
  </svg>
  <svg id="present" version="1.0" xmlns="http://www.w3.org/2000/svg"
   width="225" height="225" viewBox="0 0 225.000000 225.000000"
   preserveAspectRatio="xMidYMid meet">
  <metadata>
  Created by potrace 1.13, written by Peter Selinger 2001-2015
  </metadata>
  <g transform="translate(0.000000,225.000000) scale(0.100000,-0.100000)"
  fill="#000000" stroke="none">
  <path d="M1610 2240 c-126 -30 -247 -125 -349 -274 -38 -55 -113 -206 -141
  -283 -20 -56 -40 -75 -40 -39 0 30 -55 176 -97 258 -57 112 -152 216 -231 255
  -49 24 -69 28 -142 28 -68 0 -93 -5 -126 -22 -127 -68 -170 -227 -101 -377 29
  -63 119 -158 181 -191 20 -11 36 -23 36 -27 0 -5 -106 -8 -235 -8 l-235 0 0
  -280 0 -280 70 0 70 0 0 -500 0 -500 855 0 855 0 0 500 0 500 70 0 70 0 0 280
  0 280 -205 0 c-113 0 -205 3 -204 8 0 4 25 27 55 51 153 120 228 320 175 463
  -48 126 -186 192 -331 158z m147 -170 c37 -22 48 -52 41 -115 -15 -133 -174
  -282 -397 -373 -55 -23 -151 -30 -151 -12 0 23 69 182 109 253 118 205 291
  313 398 247z m-1079 -55 c44 -19 72 -44 119 -108 40 -54 108 -204 118 -260 l7
  -37 -68 24 c-157 53 -292 144 -328 220 -19 40 -21 114 -3 137 32 41 92 50 155
  24z m302 -735 l0 -140 -355 0 -355 0 0 140 0 140 355 0 355 0 0 -140z m1000 0
  l0 -140 -355 0 -355 0 0 140 0 140 355 0 355 0 0 -140z m-1000 -675 l0 -465
  -285 0 -285 0 0 465 0 465 285 0 285 0 0 -465z m860 0 l0 -465 -285 0 -285 0
  0 465 0 465 285 0 285 0 0 -465z"/>
  </g>
  </svg>

</div>
            
          
!
            
              body {
  background-color: #e74c3c;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 335px;
}

.tree {
  height: 200px;
  width: 200px;
}

.present {
  height: 200px;
  width: 200px;
}

.flip-container { perspective: 1000; width: 250px;height: 250px; }
.flip-container:hover .inner-flip-container { transform: rotateY(180deg); }
.inner-flip-container {
	transition: 0.6s;
	transform-style: preserve-3d;
	position: relative;
}

.front, .back {
  background: #099A4D;
  color: #FF6B5C;
  display: flex;
  justify-content: center;
  align-items: center;
	backface-visibility: hidden;
  width: 250px;
  height: 250px;
  font-size: 50px;
}

.front {
	position: absolute;
}
.back {
  transform: rotateY(180deg);
}

.invisible {
  display: none;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console