css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              .container
  input(type="checkbox" id="control")
  label(id="main-menu" for="control")
    .share.top
      .toplayer
    .share.mid
      .toplayer
    .share.bottom
      .toplayer
  .icon-container
    i(class="fa fa-github fa-4x icon-3d")
    .section.one
    .section.two
    .section.three
    .section.four
    a(href="#" class="hover-toggle")
  .icon-container
    i(class="fa fa-twitter fa-4x icon-3d")
    .section.one
    .section.two
    .section.three
    .section.four
    a(href="#" class="hover-toggle")
  .icon-container
    i(class="fa fa-instagram fa-4x icon-3d")
    .section.one
    .section.two
    .section.three
    .section.four
    a(href="#" class="hover-toggle")
  .icon-container
    i(class="fa fa-whatsapp fa-4x icon-3d")
    .section.one
    .section.two
    .section.three
    .section.four
    a(href="#" class="hover-toggle")
  .icon-container
    i(class="fa fa-facebook fa-4x icon-3d")
    .section.one
    .section.two
    .section.three
    .section.four
    a(href="#" class="hover-toggle" id="final")
            
          
!
            
              $primary: #2F6EA1
$secondary: #E06D59
$background: #ccc
$button: #ffffff
$cardTransition: .5s
$cardTransitionTwo: 1s
$cardDelay: .2s

@mixin sections($rotateX, $rotateY, $translateZ, $transformOrigin)
  transform-origin: $transformOrigin
  transform: rotateX($rotateX + deg) rotateY($rotateY + deg) translateZ($translateZ + px)

.icon-3d
  color: white
  position: absolute
  left: 10px
  top: 5px
  z-index: 200
  transition: $cardTransition
  
body
  background: lighten($secondary, 10%)
  height: 110vh
  width: 100vw
  display: flex
  justify-content: center
  align-items: center
  
.container
  position: relative
  top: -20px
  
.hover-toggle, label
  height: 75px
  width: 75px
  background: white
  margin-bottom: 1px
  cursor: pointer
  background: $primary
  border: 3px solid #884F47
 
.border
  position: absolute
  transform-origin: center center
  width: calc(100% - 12px)
  height: calc(100% - 12px)
  border: 2px solid white
  top: 4px
  left: 4px
  
label
  display: block
  position: absolute
  transition: 1s
  z-index: 100
  &:hover
    background: lighten($primary, 10%)

.share
  position: absolute
  height: 9px
  width: 9px
  background: $primary
  border-radius: 100%
  border: 2px solid white
  z-index: 100

.toplayer
  height: 9px
  width: 9px
  position: absolute
  background: $primary
  z-index: 100
  border-radius: 100%
  
.top
  z-index: 500
  right: 15px
  top: 13px
  animation: move 3s linear forwards infinite
  @keyframes move
    25%
      transform: translateX(-27px) translateY(-2px)
    50%
      transform: translateX(-27px) translateY(-2px)
    75%
      transform: translateX(0px) translateY(0px)
    
.bottom
  bottom: 17px
  right: 15px
  animation: move2 3s linear forwards infinite
  @keyframes move2
    25%
      transform: translateX(-27px) translateY(0px)
    50%
      transform: translateX(-27px) translateY(0px)
      transform: translateX(-27px) translateY(-2px)
    75%
      transform: translateX(0px) translateY(0px)
    
.mid
  top: 28px
  left: 15px
  animation: switch 3s linear forwards infinite
  z-index: 100
  &:before
    content: ''
    position: absolute
    height: 2px
    width: 24px
    background: white
    transform: rotate(28deg)
    top: 12px
    left: 8px
    animation: switch2 3s linear forwards infinite
    z-index: -10
  &:after
    content: ''
    position: absolute
    transform: rotate(-25deg)
    width: 0px
    height: 2px
    width: 24px
    top: -4px
    left: 8px
    background: white
    animation: switch3 3.0s linear forwards infinite
    z-index: -10
  @keyframes switch
    25%
      transform: translateX(34px)
    50%
      transform: translateX(34px)
    75%
      transform: translateX(0px)

@keyframes switch2
  25%
    transform: translateX(-28px) translateY(2px) rotate(150deg)
  50%
    transform: translateX(-28px) translateY(2px) rotate(150deg)
  75%
    transform: translateY(0px) translateX(0px) rotate(28deg)
  
@keyframes switch3
  25%
    transform: translateX(-28px) translateY(-3px) rotate(-150deg)
  50%
    transform: translateX(-28px) translateY(-3px) rotate(-150deg)
  75%
    transform: translateY(0px) translateX(0px) rotate(-25deg)
  
.bottomTwo
  bottom: 14px
  left: 15px
  
.icon-container
  cursor: pointer
  position: absolute
  transition: $cardTransitionTwo
  opacity: 0
  height: 75px
  width: 75px
  perspective: 1000px
    
.hover-toggle
  position: absolute
  display: block
  height: 75px
  width: 75px
  
input
  display: none
  position: absolute
  z-index: 100
  
input:checked ~ label
  border-top-right-radius: 100px
  border-top-left-radius: 100px
  transition: $cardTransitionTwo
  transition-delay: $cardDelay
  transform: translateY(-290%)
  
@for $i from 3 through 7
  input:checked ~ .icon-container:nth-child(#{$i})
    $y: (87 * $i) - 410
    $delay: 40 * $i
    opacity: 1
    transform: translateY(($y + px))
    transition: $cardTransitionTwo
    transition-delay: $delay + ms
 
.section
  position: absolute
  height: 50%
  width: 50%
  z-index: 200

.section:hover ~ .hover-toggle
  transition: $cardTransition
  background: lighten($primary, 10%)
  
.one
  top: 0px
  left: 0px
  &:hover ~ .hover-toggle
    +sections(11, -11, 0, bottom right)

.two
  top: 0px
  right: 0px
  &:hover ~ .hover-toggle
    +sections(11, 11, 0, bottom left)
  
.three
  bottom: 0px
  left: 0px 
  &:hover ~ .hover-toggle
    +sections(-11, -11, 0, top right)
  
.four
  bottom: 0px
  right: 0px
  &:hover ~ .hover-toggle
    +sections(-11, 11, 0, bottom left)
      
.icon-container > #final
  border-bottom-right-radius: 100px
  border-bottom-left-radius: 100px

.icon-container:nth-child(7) > .icon-3d
  left: 20px
  top: 10px
  
.icon-container:active > .icon-3d
  transform: scale(.8)
            
          
!
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.
Loading ..................

Console