123

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.

            
              
svg(style="opacity:0;агheight:0")
  g#fashion-icon
    path(d='M15.49,32l0.556-0.369l0.32-0.076l0.239,0.158l14.672-21.176h0.16v-0.229l0.553-0.799l-0.555-0.366l0.531-0.398L25.416,0.43V0h-9.364v0.652l-0.004,0.003V0H6.625v0.434l-6.591,8.39l0.534,0.402H0.566l0,0L0.009,9.594 M20.904,9.23h-4.184V9.226h-5.498l4.833-7.36L20.904,9.23z M17.277,1.306h6.584l-2.026,6.924L17.277,1.306z M10.229,8.303L8.19,1.317h6.625L10.229,8.303zM9.097,9.226H1.416l5.601-7.13L9.097,9.226z M16.721,10.543v-0.006h3.811l-4.514,18.176l-4.499-18.17H16.721z M25.025,2.078l5.586,7.089L30.566,9.23h-7.634L25.025,2.078z M10.133,10.543l4.381,17.691L2.29,10.543H10.133z M17.575,27.982l4.333-17.445h7.754L17.575,27.982z')
  g#education-icon
    path(d='M7.111,17.373v5.421c0,2.387,3.714,4.939,8.296,4.939s8.296-1.936,8.296-4.323c0-0.209,0-0.616,0-0.616v-5.383l5.927-3.078v3.634c-0.688,0.254-1.186,0.934-1.186,1.738c0,1.024,0.796,1.854,1.777,1.854S32,20.729,32,19.705c0-0.805-0.497-1.483-1.186-1.738v-4.643c0.045-0.13,0.076-0.267,0.076-0.411c0-0.468-0.255-0.896-0.656-1.105L15.974,4.397c-0.167-0.086-0.348-0.13-0.529-0.13s-0.362,0.043-0.529,0.13L0.656,11.809C0.255,12.018,0,12.446,0,12.914c0,0.468,0.255,0.896,0.656,1.105 M15.444,5.502l14.261,7.412l-14.261,7.41l-14.259-7.41L15.444,5.502z M22.518,23.41c0,1.29-2.704,3.088-7.11,3.088c-4.125,0-7.111-2.213-7.111-3.704v-4.806l6.619,3.438c0.167,0.088,0.348,0.132,0.529,0.132c0.182,0,0.362-0.044,0.529-0.132l6.544-3.399V23.41z M30.222,20.323c-0.326,0-0.592-0.277-0.592-0.618s0.266-0.617,0.592-0.617c0.327,0,0.593,0.276,0.593,0.617S30.549,20.323,30.222,20.323z')
  g#tv-icon
    path(fill-rule='evenodd', clip-rule='evenodd', d='M25.89,8.097H6.11c-1.092,0-1.978,0.893-1.978,1.993v14.939c0,1.102,0.886,1.991,1.978,1.991h19.78c1.093,0,1.979-0.89,1.979-1.991V10.089C27.868,8.99,26.982,8.097,25.89,8.097zM26.879,25.028c0,0.55-0.444,0.995-0.989,0.995H6.11c-0.545,0-0.989-0.445-0.989-0.995V10.089c0-0.549,0.444-0.996,0.989-0.996h19.78c0.545,0,0.989,0.447,0.989,0.996V25.028z M17.979,7.101l-1.122-1.129l3.803-5.385l-0.772-0.558l-3.585,5.079L12.093,0l-0.729,0.615l4.126,5.008l-1.469,1.478 M4.132,29.012h2.967L6.11,32h0.989l0.989-2.988h15.824L24.901,32h0.988l-0.988-2.988h2.967v-0.997H4.132V29.012z')
  g#celebrities-icon
    path(d='M0.016,0h31.969v0.031c-10.646,0-21.292,0-31.938,0c0,3.797,0,7.594,0,11.391c4.171,0,8.343,0,12.515,0c1.366-3.633,2.736-7.265,4.1-10.898c1.284,3.632,2.559,7.267,3.841,10.898c3.799,0.001,7.599-0.001,11.398,0.001c-2.959,2.793-5.917,5.586-8.875,8.378c1.438,3.816,2.878,7.632,4.313,11.448c-3.545-2.129-7.09-4.26-10.635-6.389c-3.468,1.99-6.934,3.984-10.401,5.975c1.326-3.667,2.645-7.337,3.963-11.007C6.86,17.042,3.453,14.256,0.047,11.47c-0.001,6.844,0,13.687,0,20.53H0.016V0z M13.256,12.421c-3.488,0-6.976,0.002-10.463-0.001c2.885,2.359,5.771,4.719,8.656,7.078c-1.086,3.036-2.185,6.068-3.273,9.104c2.846-1.636,5.692-3.271,8.538-4.906c2.89,1.734,5.777,3.471,8.667,5.205c-1.177-3.125-2.354-6.249-3.529-9.375c2.512-2.365,5.018-4.736,7.527-7.104c-3.195-0.001-6.392,0-9.588,0c-1.055-2.991-2.106-5.982-3.16-8.974C15.51,6.44,14.379,9.429,13.256,12.421z')
    circle(cx='16.469', cy='17.156', r='3.5')
  g#plant-icon
    path(d='M15.903,12.889c6.587,0,11.945-5.288,11.945-11.788c0-0.14-0.005-0.28-0.012-0.459c-0.012-0.343-0.288-0.617-0.634-0.631C27.047,0.005,26.892,0,26.732,0c-6.119,0-11.172,4.567-11.857,10.428c-0.711-4.655-4.78-8.24-9.694-8.24c-0.129,0-0.256,0.003-0.383,0.009C4.452,2.208,4.176,2.48,4.161,2.82c-0.006,0.127-0.01,0.254-0.01,0.382c0,5.342,4.403,9.687,9.814,9.687c0.107,0,0.215-0.004,0.322-0.008v5.594H9.832c-0.192,0-0.376,0.082-0.501,0.226c-0.126,0.144-0.183,0.334-0.154,0.521l1.798,12.22c0.047,0.321,0.326,0.56,0.654,0.56h2.164c0.326,0,0.604-0.234,0.654-0.553c0.038-0.243,0.254-0.426,0.502-0.426s0.464,0.183,0.502,0.426C15.501,31.766,15.779,32,16.106,32h2.163c0.329,0,0.607-0.238,0.655-0.56l1.798-12.22c0.027-0.187-0.029-0.377-0.154-0.521c-0.127-0.144-0.31-0.226-0.501-0.226h-4.456v-5.593C15.708,12.885,15.806,12.889,15.903,12.889z M26.523,1.309c-0.111,5.614-4.719,10.162-10.409,10.271C16.226,5.965,20.833,1.417,26.523,1.309z M5.48,3.498c4.444,0.153,8.031,3.694,8.187,8.079C9.223,11.424,5.636,7.885,5.48,3.498zM17.696,30.693h-1.117c-0.306-0.589-0.923-0.979-1.63-0.979s-1.324,0.39-1.63,0.979h-1.117l-1.605-10.912h8.705L17.696,30.693z')
  g#bowling-icon
    path(d='M27.556,12.333l-0.021-5.028l0.761-3.181c0.018-0.069,0.022-0.14,0.017-0.208c0.004-0.061,0.007-0.123,0.007-0.185c0-2.057-1.634-3.73-3.644-3.73c-2.009,0-3.644,1.674-3.644,3.73c0,0.096,0.007,0.192,0.014,0.287c0,0.015,0,0.029,0.003,0.043l0.012,0.115c0.002,0.027,0.007,0.054,0.014,0.08l0.738,3.02v5.047c-0.264,0.542-1.187,2.503-1.687,4.423c-0.092,0.348,0.11,0.706,0.448,0.8c0.34,0.097,0.688-0.113,0.777-0.462c0.412-1.579,1.155-3.242,1.49-3.951h3.682c4.915,10.728,1.019,16.447,0.114,17.562h-4c-0.279-0.336-0.702-1.177-1.181-2.707c-0.107-0.344-0.464-0.53-0.8-0.423c-0.333,0.111-0.516,0.479-0.409,0.823c0.884,2.824,1.55,3.324,1.769,3.487C22.124,31.956,22.255,32,22.389,32h4.533c0.17,0,0.332-0.07,0.452-0.194C27.629,31.538,33.536,25.141,27.556,12.333z M23.081,11.825v-3.92h3.186l0.018,3.92H23.081zM27.038,3.914l-0.641,2.675h-3.442l-0.644-2.676c-0.006-0.06-0.011-0.121-0.011-0.183c0-1.336,1.065-2.423,2.374-2.423c1.31,0,2.373,1.087,2.373,2.423C27.048,3.786,27.044,3.842,27.038,3.914z')
    path(d='M10.971,13.075c-5.07,0-9.195,4.244-9.195,9.462S5.901,32,10.971,32c5.07,0,9.195-4.245,9.195-9.463S16.041,13.075,10.971,13.075z M10.971,30.693c-4.37,0-7.925-3.658-7.925-8.156s3.555-8.155,7.925-8.155c4.37,0,7.924,3.657,7.924,8.155S15.341,30.693,10.971,30.693z')
    path(d='M5.701,17.869c-0.766,0.55-0.956,1.642-0.422,2.432c0.317,0.468,0.838,0.748,1.393,0.748c0.348,0,0.683-0.109,0.969-0.315c0.372-0.266,0.621-0.665,0.701-1.123c0.08-0.46-0.019-0.924-0.278-1.306C7.548,17.542,6.449,17.336,5.701,17.869z M6.914,19.662c-0.188,0.136-0.464,0.081-0.594-0.108c-0.134-0.199-0.085-0.475,0.106-0.612c0.072-0.053,0.157-0.078,0.243-0.078c0.141,0,0.272,0.069,0.352,0.188c0.065,0.097,0.089,0.213,0.07,0.328C7.071,19.494,7.009,19.595,6.914,19.662z')
    path(d='M10.121,18.639c0.348,0,0.685-0.107,0.972-0.313c0.77-0.552,0.96-1.645,0.424-2.438c-0.517-0.765-1.621-0.971-2.37-0.437c-0.769,0.552-0.959,1.646-0.424,2.438C9.041,18.358,9.563,18.639,10.121,18.639z M9.873,16.523c0.073-0.052,0.158-0.08,0.247-0.08c0.142,0,0.275,0.071,0.355,0.19c0.136,0.202,0.087,0.479-0.108,0.618c-0.19,0.14-0.47,0.085-0.602-0.108C9.629,16.942,9.678,16.664,9.873,16.523z')
    path(d='M9.361,19.53c-0.373,0.269-0.623,0.669-0.702,1.13c-0.08,0.46,0.018,0.925,0.278,1.309c0.318,0.47,0.841,0.751,1.397,0.751c0.348,0,0.685-0.108,0.971-0.314c0.77-0.55,0.96-1.644,0.425-2.438C11.213,19.202,10.104,18.998,9.361,19.53z M10.581,21.333c-0.192,0.135-0.471,0.081-0.602-0.11c-0.066-0.098-0.091-0.216-0.07-0.334c0.02-0.115,0.083-0.218,0.178-0.285c0.073-0.053,0.157-0.079,0.245-0.079c0.143,0,0.275,0.07,0.356,0.188C10.824,20.914,10.776,21.192,10.581,21.333z')
  g#book-icon
    path(fill-rule='evenodd', clip-rule='evenodd', d='M16,31.36L0,27.265V0.64l16,4.096L32,0.64v26.625L16,31.36z M2,25.216l13,3.804V6.565L2,3.712V25.216z M30,3.712L17,6.565V29.02l13-3.804V3.712z')
  g#joystick2-icon
    path(d='M13.214,9.311c0.024,0.021,0.048,0.04,0.073,0.06l-0.006,0.01c0.009,0.005,0.06,0.037,0.182,0.112c0.026,0.017,0.051,0.03,0.073,0.044c0.007,0.005,0.015,0.009,0.022,0.013c0.241,0.148,0.671,0.41,1.397,0.854c1.228,0.75,1.229,0.885,1.231,1.284c0.002,0.368,0.293,0.665,0.651,0.665c0.002,0,0.003,0,0.005,0c0.359-0.002,0.65-0.305,0.647-0.674c-0.008-1.228-0.681-1.698-1.868-2.424l-1.348-0.824c-0.021-0.013-0.043-0.027-0.065-0.04c-0.2-0.137-2.719-1.917-1.616-3.943l1.643-2.827c0.184-0.317,0.083-0.728-0.226-0.917c-0.311-0.19-0.71-0.085-0.895,0.232l-1.652,2.843C10.173,6.152,11.903,8.315,13.214,9.311z')
    path(d='M24.48,13.614L24.48,13.614l-16.989,0C3.36,13.613,0,17.174,0,21.55c0,2.945,0,9.841,5.112,9.841c2.602,0,7.003-3.078,8.713-6.762h4.35c1.71,3.684,6.111,6.762,8.714,6.762c5.11,0,5.11-6.896,5.11-9.841C31.999,17.174,28.64,13.614,24.48,13.614z M26.889,30.054c-2.023,0-6.274-2.844-7.689-6.35c-0.101-0.25-0.339-0.412-0.602-0.412h-5.196c-0.263,0-0.501,0.162-0.602,0.412c-1.416,3.506-5.665,6.35-7.688,6.35c-3.355,0-3.808-4.3-3.808-8.504c0-3.638,2.775-6.598,6.216-6.598c0,0,0.001,0,0.001,0l16.987-0.001c3.412,0,6.188,2.96,6.188,6.599C30.696,25.754,30.244,30.054,26.889,30.054z')
    path(d='M24.232,17.552c-0.453,0.464-0.453,1.218,0,1.683c0.452,0.464,1.186,0.464,1.639,0c0.453-0.465,0.453-1.219,0-1.683S24.685,17.088,24.232,17.552z')
    path(d='M26.812,20.2c-0.452,0.464-0.452,1.217,0,1.681c0.453,0.465,1.187,0.465,1.639,0c0.452-0.464,0.452-1.217,0-1.681C27.999,19.734,27.266,19.734,26.812,20.2z')
    path(d='M24.232,22.847c-0.453,0.466-0.453,1.219,0,1.683c0.452,0.464,1.186,0.464,1.639,0s0.453-1.217,0-1.681C25.418,22.383,24.685,22.383,24.232,22.847z')
    path(d='M21.651,20.2c-0.452,0.464-0.452,1.217,0,1.681c0.453,0.465,1.188,0.465,1.64,0c0.451-0.464,0.451-1.217,0-1.681C22.839,19.734,22.104,19.734,21.651,20.2z')
    path(d='M7.125,17.724c-1.782,0-3.232,1.489-3.232,3.317c0,1.829,1.451,3.316,3.232,3.316c1.782,0,3.232-1.487,3.232-3.316C10.357,19.213,8.907,17.724,7.125,17.724z M7.125,23.02c-1.063,0-1.928-0.888-1.928-1.979c0-1.092,0.865-1.979,1.928-1.979c1.063,0,1.929,0.888,1.929,1.979C9.053,22.132,8.188,23.02,7.125,23.02z')

mixin icon-banner(el)
  .icon-banner(class=el.class, id=el.id)
    - var el = el.icon
    div(class="icon " + el.class, id=el.idAttribute, title=el.title)
      svg(viewBox='0 0 32 32')
        use(xlink:href="#" + el.path)

.carousel.is-open#js-carousel
  .carousel-top
    .carousel-top--circle-large
    .carousel-top--circle-small

  .carousel-bottom
    .carousel-bottom--top
    .carousel-bottom--bottom
    .carousel-bottom--bottom2
    .carousel-bottom--bottom3

  .carousel--3d
    .carousel--scene
      .carousel--stage
        .model
          - var width = 50, height = 370.5, amount = 36;
          - var em = 1/16;
          - for (var i=1; i<=amount;i++)  
            .dome(class="s" + i)
              svg(style='width:' + (width*rem) + 'rem; height: ' + height*em + 'em;')
                polygon(points=width/2 + ',0 ' + width + ',' + height + ' 0, ' + height)

      .scene
        .carousel-middle

        .shape.cylinder-1.cyl-1
          - var captions = ['Brands', 'Interests', 'Celebrities', 'TV shows']
          - var c = -1;
          - for(var i=0; i<=36;i++)
            .face.side(class="s" + i)
              if (i % 4 == 0)
                - c = c + 1
                - text = (c < 9) ? captions[c%captions.length] : captions[3]
                - el = { text: text, class: 'is-'+(text.toLowerCase().replace(/\s/gi, '\-'))}
                //.banner
                  .banner__text #{el.text}
                  svg(viewBox="0 0 119 60")
                    g#Page-1(stroke='none', stroke-width='1', fill='none', fill-rule='evenodd', sketch:type='MSPage')
                      ellipse#Oval-1(fill='#F6C855', sketch:type='MSShapeGroup', cx='59', cy='30', rx='50', ry='30')
                      circle#Oval-2(fill='#F6C855', sketch:type='MSShapeGroup', cx='109', cy='32', r='10')
                      circle#Oval-4(fill='#FFFFFF', sketch:type='MSShapeGroup', cx='109', cy='32', r='2')
                      circle#Oval-3(fill='#F6C855', sketch:type='MSShapeGroup', cx='10', cy='30', r='10')
                      circle#Oval-5(fill='#FFFFFF', sketch:type='MSShapeGroup', cx='10', cy='30', r='2')
        - icons = ['fashion', 'education', 'plant', 'book', 'bowling', 'tv', 'celebrities', 'joystick2']
        - r = -1
        - for(var i=2; i<=9;i++)
          .shape.cylinder-2(class="cyl-" + i)
            - for(var j=0; j<=2;j++)
              .face.side(class="s" + j)
                if (j == 2)
                  - r = r+1
                  - el = { }
                  - el.icon = { path: icons[r]+'-icon' }
                  +icon-banner(el)

.ground
  .button#js-button toggle
            
          
!
            
              /* MIXINS */
rect(size)
  width size
  height size

/* ENVIROMENT */
fontSize = 16
PX = (1/fontSize)rem
/* grid size = 10px in rem equivalent */
gs = 10*PX

html
  font-size (fontSize)px

body
  background #6ED2D2 url('https://is.gd/Tv0ZyT') repeat top left
  position   relative

html, body
  height 100%

buttonColor = #DD5754
buttonHeight = 5*gs
.button
  background buttonColor
  border-radius 3*PX
  text-transform uppercase
  color white
  height buttonHeight
  line-height buttonHeight
  width  20*gs
  text-align center
  letter-spacing 2*PX
  &:hover
    background-color lighten(buttonColor,3)
    cursor pointer
  &:active
    background-color buttonColor

groundHeight = 12*gs
.ground
  position absolute
  left 0
  bottom 0

  height groundHeight
  width 100%

  background #493442 url('https://is.gd/Tv0ZyT') repeat bottom right
  
  .button
    margin-left  auto
    margin-right auto
    margin-top   ((groundHeight - buttonHeight)/2)
    position relative
    z-index 2

  
/* CAROUSEL */
carouselTransitionTime = .3s
.carousel
	.no-preserve-3d &
		background url('i/carousel-fallback.png') no-repeat center center
		width  326*PX
		height 387*PX
		transform scale(1)
		right 5%

		.carousel--3d, .carousel-bottom, .carousel-middle, .carousel-top
			display none

	.carousel--3d
		transform rotateY(-180deg)
		transition all carouselTransitionTime ease

	.cylinder-1
		.side
			height 0
			transition height (carouselTransitionTime/2) ease-out
			transition-delay carouselTransitionTime

		.banner
			backface-visibility hidden
			transform scale(0) translateZ(PX)
			transition all carouselTransitionTime ease-out
			transsition-delay 0

	.carousel-middle
		width .75*gs
		margin-left - 3*PX
		transition all (carouselTransitionTime/2) cubic-bezier(0.545, 0.380, 0.465, 1.540)
		transform translateY(400*PX) translateX(-2*PX) translateZ(22*PX) rotateY(-120deg)
		transition-delay 2*carouselTransitionTime

	.cylinder-2
		.icon-banner
			transform scale(0) translateZ(1px)
			transition all carouselTransitionTime linear
			transition-delay 0

		.side
			height 0
			top -2*gs
			transition all carouselTransitionTime cubic-bezier(0.545, 0.380, 0.465, 1.540)
	
	width = 20*PX
	.carousel-bottom
		width width
		margin-left -(width/2)
		left 50%
		transition all carouselTransitionTime ease-in
		transition-delay 2*carouselTransitionTime

	carouselAnimationTime  = 40s
	rotateTime = 6*carouselTransitionTime
	rotateEasing = linear
	&.is-open
		.carousel--3d
			animation rotateCarousel carouselAnimationTime rotateEasing infinite
			animation-delay rotateTime

		.carousel-middle
			animation rotateCarouselMiddle carouselAnimationTime rotateEasing infinite
			animation-delay rotateTime
			transition all carouselTransitionTime cubic-bezier(0.545, 0.380, 0.465, 1.540)

			
		iconBannerAnimationTime = 4s
		.icon-banner
			top 35%
			animation iconBanner iconBannerAnimationTime ease infinite
			animation-delay rotateTime
		.cylinder-2:nth-of-type(odd)
			.icon-banner
				top 65%
				animation iconBanner2 iconBannerAnimationTime ease infinite
				animation-delay rotateTime

		.cylinder-1
			.side
				height 4rem
				transition-delay carouselTransitionTime
				transition-timing-function cubic-bezier(0.545, 0.380, 0.465, 1.540)
			
			.banner
				transform scale(1) translateZ(PX)

			c = -1
			for i in 0..36
				if i % 4 == 0
					.s{i}
						.banner
							c = c+1
							transition-delay (3+(i/16))*carouselTransitionTime

		.carousel-middle
			transform translateY(400*PX) translateX(-2*PX) translateZ(22*PX) rotateY(-120deg)
			width 5rem
			margin-left -2.5rem
			transition-delay 3*carouselTransitionTime

		.carousel-bottom
			width 36rem - 10*PX
			left 0
			margin-left -2rem
			transition-timing-function cubic-bezier(0.545, 0.380, 0.465, 1.540)
			transition-delay 2*carouselTransitionTime

		.cylinder-2
			.side
				// background-color #dd5754
				height 16rem + 2*PX
				top 0
				transition-delay 4*carouselTransitionTime
				transition-timing-function ease-out

			.icon-banner
				transform scale(1) translateZ(1*PX)
				transition-delay 5.5*carouselTransitionTime
				transition-delay 4.5*carouselTransitionTime

.carousel-middle
	position absolute
	width 5rem
	height 22rem
	background-color #571313
	top 15rem
	left 50%

.carousel-bottom
	position absolute
	width 36rem - 10*PX
	z-index 1
	height   2.5rem
	bottom 	-4.75rem
	margin-left - 2rem
	background-color #dd5754
	transform translateZ(400*PX)

.carousel-bottom--top, .carousel-bottom--bottom
	width 101.5%
	margin-left -0.75%
	background-color #891b1b
	height .25rem
	position absolute
	border-radius 2*PX

.carousel-bottom--bottom
	bottom 0

width = 90%
.carousel-bottom--bottom2
	position absolute
	width width
	left ((100% - width)/2)
	height .5rem
	bottom -.5rem
	background-color #9b2e2e

.carousel-bottom--bottom3
	position absolute
	height 1rem + 2*PX
	width  7rem
	left 50%
	margin-left -3.5rem
	bottom -1.5rem - 2*PX
	background-color #571313

.dome
	position absolute
	display inline-block
	transition all .25s ease-out
	backface-visibility hidden
	fill #f9f1dd
	&:nth-of-type(even)
		fill #ff6d6a

.model
	for i in 1..36
		.s{i}
			transform translate3d(-60*PX, 0, 0) rotateZ(i*10deg) scaleZ(1) rotateX(-90deg)//
			transform-origin 50% top 0
			width: 48.5*PX
			height: 370.5*PX
			transition-delay .5s
			.carousel.is-open &
				transition-delay 0
				transform translate3d(-60*PX, 0, 0) rotateZ(i*10deg) scaleZ(1) rotateX(-39.5deg)


.carousel--scene
	transform perspective(200000*PX) rotateX(90deg) rotateZ(50deg) translateZ(250*PX)
	transform-origin 50% 50%
	margin-left -50%
	margin-top  -50%
	left 50%
	top 50%

.carousel
	position absolute
	bottom groundHeight + 3.1*gs
	left  50%
	width  500*PX
	height 500*PX
	transfrom-origin center bottom
	transform scale(.8) translateX(-50%)
	margin-left - 5*gs
	z-index 1

	svg
		position absolute
		backface-visibility hidden
	

.carousel--3d, .carousel--scene, .carousel--stage
	transform-style:preserve-3d
	position:absolute
	width:100%
	height:100%

.carousel--stage
	left:57%
	top:50%
	opacity:1


width = 134*PX
height = 80*PX
.banner
	width width
	height height
	top -(height/2)
	left -(width/2) + (3.1581877625221533/2)em
	retina 'i/brands', 100%, transparent
	position absolute
	backface-visibility hidden
	transform translateZ(2px)
  svg
    rect 100%


.banner__text
	position absolute
	top  2*gs
	left 0
	width 100%
	color white
	text-align center

fontSize = 32*PX
.banner--text
	font-size fontSize
	padding-top 5*PX
	color white
	text-align center
	position relative
	z-index 1

size = 28*PX
.banner--circle
	position absolute
	top 50%
	left -(size/2)
	margin-top -(size/2)
	width  size
	height size
	background-color inherit
	border-radius    inherit

	size = 4*PX
	&:after
		content ''
		position absolute
		top 50%
		left 50%
		margin-left - (size/2)
		margin-top  - (size/2)
		width  size
		height size
		background-color white
.banner--circle-right
	right -(size/2)
	left auto

size = 5rem
.icon-banner
	width  size
	height size
	margin-top  -(size/2)
	margin-left -(size/2)
	position absolute
	top 50%
	left 0
	background-color #DD5754
	border-radius 50%
	backface-visibility visible
	transform-style preserve-3d
	.icon
		rect 50%
		left 25%
		top  25%
		position absolute
		transform translateZ(1px)
		fill #F9F1DD
width = 2.5rem
.carousel-top
	width  width
	height 5rem
	position absolute
	top -5rem
	left 50%
	margin-left -(width/2)
	
	.carousel-top--circle-large, .carousel-top--circle-small
		width width
		height width
		background-color #f6c855
		position absolute
		bottom 0
		border-radius 50%
		box-shadow inset 0 -6*PX 0 rgba(0,0,0,.15)

	.carousel-top--circle-small
		width  (width/1.75)
		height (width/1.75)
		bottom width + 6*PX
		box-shadow inset 0 -4*PX 0 rgba(0,0,0,.15)
		left 50%
		margin-left -((width/1.75)/2)

		&:after
			content ''
			position absolute
			width 6*PX
			height 2rem
			background #d4b05c
			left 8*PX
			z-index -1

		&:before
			content ''
			position absolute
			border 4*PX solid rgba(#f6c855,0)
			border-bottom 2rem solid #f6c855
			top - 34*PX
			left 8*PX
			z-index -1

.cylinder-1 
	.face
		background-color #dd5754 
		border-bottom-left-radius  40*PX
		border-bottom-right-radius 40*PX
		backface-visibility hidden
		&:nth-of-type(odd)
			background-color #e1d7be

		&:first-of-type
			background-color transparent

.scene, .shape, .face, .face-wrapper, .cr
	position: absolute;
	transform-style preserve-3d

.scene
	width: 80rem;
	height: 80rem;
	top: 50%;
	left: 57%;
	margin: -40rem 0 0 -40rem;
	transform rotateX(-90deg) rotateY(5deg) translate3d(-33*PX,234*PX,-22*PX)
	transform-origin 50% 50%

.shape
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	transform-origin 50%

.face, .face-wrapper
	transform-origin 0 0
	backface-visibility hidden
	/* hidden by default, prevent blinking and other weird rendering glitchs */

.face-wrapper .face
	left: 100%;
	width: 100%;
	height: 100%

.side
	left: 50%

.cr, .cr .side
	height: 100%

/* .cyl-1 styles */
.cyl-1
	transform translate3d(-0.1875rem, 2.0625rem, 1.1875rem) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
	opacity:1;
	width:35.8125rem;
	height:4rem;
	margin:-2rem 0 0 -17.90625rem;
	.side
		width:3.1581877625221533rem
		height:4rem
	.bm
		width:35.8125rem
		height:35.8125rem
		border-radius: 50%
		transform: rotateX(-90deg) translateY(-50%)
		top: 65%

	start = 5
	for i in 1..37
		.s{i}
			transform rotateY((start+(i*10))deg) translate3d(-50%, 0, 17.88125rem)

r = 0
xz = -11.091666666666663rem, -9.958333333333334rem, 0, -14rem, 10.658333333333337rem, -10.250000000000002rem, 15.666666666666666rem, 0.08333333333333333rem, 11.450000000000003rem, 10.895833333333334rem, -11.070833333333331rem, 11.979166666666666rem, -16rem, 0, 0, 16.583333333333332rem
for i in 2..9
	if (i == 2)
		degree = -90deg
	if (i == 3)
		degree = 240deg
	if (i == 4)
		degree = 180deg
	if (i == 5)
		degree = 160deg
	if (i == 6)
		degree = 100deg
	if (i == 7)
		degree = 20deg
	if (i == 8)
		degree = -40deg
	if (i == 9)
		degree = 70deg
	.cyl-{i}
		transform translate3d(xz[r], 10.249999999999998rem, xz[r+1]) rotateX(0deg) rotateY(degree) rotateZ(0deg);
		opacity:1;
		width:.25rem;
		height:17rem;
		margin:-7.5rem 0 0 -0.125rem

		.side
			width:0.4580127018922192rem
			height:17rem
			backface-visibility visible
		.face, .side
			background-color: #faf4e5

		start = 60
		for j in 0..2
			.s{j}
				transform rotateY((start+(j*120))deg) translate3d(-50%, 0, 0.1rem)
	r += 2

@keyframes iconBanner
	0%
		top 35%
	50%
		top 65%
	100%
		top 35%

@keyframes iconBanner2
	0%
		top 65%
	50%
		top 35%
	100%
		top 65%


@keyframes rotateCarousel
	0%
		transform rotateY(-180deg)
	100%
		transform rotateY(-540deg)

@keyframes rotateCarouselMiddle
	0%
		transform translateY(400*PX) translateX(-2*PX) translateZ(22*PX) rotateY(-120deg)
	100%
		transform translateY(400*PX) translateX(-2*PX) translateZ(22*PX) rotateY(240deg)


            
          
!
            
              $carousel = $('#js-carousel')
$('#js-button').on('click', function(){
  $carousel.toggleClass('is-open');
});


            
          
!
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