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
  .room
    .grass
    .eastergate
      .eastergate__entrance
      .eastergate__portal
      %input#egg-1.egg{:type => "checkbox"}
      %label.egg__label{:for => "egg-1"}
      %input#egg-2.egg{:type => "checkbox"}
      %label.egg__label{:for => "egg-2"}
      %input#egg-3.egg{:type => "checkbox"}
      %label.egg__label{:for => "egg-3"}
      %input#egg-4.egg{:type => "checkbox"}
      %label.egg__label{:for => "egg-4"}
      %input#egg-5.egg{:type => "checkbox"}
      %label.egg__label{:for => "egg-5"}
      %input#egg-6.egg{:type => "checkbox"}
      %label.egg__label{:for => "egg-6"}
      .eastergate__gate
    .walkway
      .walkway__shadow
            
          
!
            
              body {
  margin: 0
}

.container {
  width: 100vw;
  height: 100vh;
  background-color: #BBDEFB
}

.grass {
  position: absolute;
  bottom: 0;
  width: 100vw;
  height: 30vw;
  box-shadow: inset 0px 2px 10px 0px rgba(179,224,252,1);
  background-color: green;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 28" width="56" height="28"%3E%3Cpath fill="#1B5E20" fill-opacity="0.4" d="M56 26v2h-7.75c2.3-1.27 4.94-2 7.75-2zm-26 2a2 2 0 1 0-4 0h-4.09A25.98 25.98 0 0 0 0 16v-2c.67 0 1.34.02 2 .07V14a2 2 0 0 0-2-2v-2a4 4 0 0 1 3.98 3.6 28.09 28.09 0 0 1 2.8-3.86A8 8 0 0 0 0 6V4a9.99 9.99 0 0 1 8.17 4.23c.94-.95 1.96-1.83 3.03-2.63A13.98 13.98 0 0 0 0 0h7.75c2 1.1 3.73 2.63 5.1 4.45 1.12-.72 2.3-1.37 3.53-1.93A20.1 20.1 0 0 0 14.28 0h2.7c.45.56.88 1.14 1.29 1.74 1.3-.48 2.63-.87 4-1.15-.11-.2-.23-.4-.36-.59H26v.07a28.4 28.4 0 0 1 4 0V0h4.09l-.37.59c1.38.28 2.72.67 4.01 1.15.4-.6.84-1.18 1.3-1.74h2.69a20.1 20.1 0 0 0-2.1 2.52c1.23.56 2.41 1.2 3.54 1.93A16.08 16.08 0 0 1 48.25 0H56c-4.58 0-8.65 2.2-11.2 5.6 1.07.8 2.09 1.68 3.03 2.63A9.99 9.99 0 0 1 56 4v2a8 8 0 0 0-6.77 3.74c1.03 1.2 1.97 2.5 2.79 3.86A4 4 0 0 1 56 10v2a2 2 0 0 0-2 2.07 28.4 28.4 0 0 1 2-.07v2c-9.2 0-17.3 4.78-21.91 12H30zM7.75 28H0v-2c2.81 0 5.46.73 7.75 2zM56 20v2c-5.6 0-10.65 2.3-14.28 6h-2.7c4.04-4.89 10.15-8 16.98-8zm-39.03 8h-2.69C10.65 24.3 5.6 22 0 22v-2c6.83 0 12.94 3.11 16.97 8zm15.01-.4a28.09 28.09 0 0 1 2.8-3.86 8 8 0 0 0-13.55 0c1.03 1.2 1.97 2.5 2.79 3.86a4 4 0 0 1 7.96 0zm14.29-11.86c1.3-.48 2.63-.87 4-1.15a25.99 25.99 0 0 0-44.55 0c1.38.28 2.72.67 4.01 1.15a21.98 21.98 0 0 1 36.54 0zm-5.43 2.71c1.13-.72 2.3-1.37 3.54-1.93a19.98 19.98 0 0 0-32.76 0c1.23.56 2.41 1.2 3.54 1.93a15.98 15.98 0 0 1 25.68 0zm-4.67 3.78c.94-.95 1.96-1.83 3.03-2.63a13.98 13.98 0 0 0-22.4 0c1.07.8 2.09 1.68 3.03 2.63a9.99 9.99 0 0 1 16.34 0z"%3E%3C/path%3E%3C/svg%3E')
}

.eastergate {
  position: absolute;
  bottom: 5vw;
  left: 25vw;
  width: 50vw;
  height: 50vw;
  box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.75);
  border: 2px solid #fff;
  border-radius: 25vw;
  background-color: #37474F;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="28" height="49" viewBox="0 0 28 49"%3E%3Cg fill-rule="evenodd"%3E%3Cg id="hexagons" fill="#212121" fill-opacity="0.4" fill-rule="nonzero"%3E%3Cpath d="M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.eastergate__portal {
  position: absolute;
  bottom: 5vw;
  left: 5vw;
  width: 40vw;
  height: 40vw;
  max-height: 85vh;
  border: 2px solid #fff;
  border-radius: 20vw;
  background-color: #212121;
  background-image: url('data:image/svg+xml,%3Csvg width="100" height="20" viewBox="0 0 100 20" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M21.184 20c.357-.13.72-.264 1.088-.402l1.768-.661C33.64 15.347 39.647 14 50 14c10.271 0 15.362 1.222 24.629 4.928.955.383 1.869.74 2.75 1.072h6.225c-2.51-.73-5.139-1.691-8.233-2.928C65.888 13.278 60.562 12 50 12c-10.626 0-16.855 1.397-26.66 5.063l-1.767.662c-2.475.923-4.66 1.674-6.724 2.275h6.335zm0-20C13.258 2.892 8.077 4 0 4V2c5.744 0 9.951-.574 14.85-2h6.334zM77.38 0C85.239 2.966 90.502 4 100 4V2c-6.842 0-11.386-.542-16.396-2h-6.225zM0 14c8.44 0 13.718-1.21 22.272-4.402l1.768-.661C33.64 5.347 39.647 4 50 4c10.271 0 15.362 1.222 24.629 4.928C84.112 12.722 89.438 14 100 14v-2c-10.271 0-15.362-1.222-24.629-4.928C65.888 3.278 60.562 2 50 2 39.374 2 33.145 3.397 23.34 7.063l-1.767.662C13.223 10.84 8.163 12 0 12v2z" fill="%239C92AC" fill-opacity="0.4" fill-rule="evenodd"/%3E%3C/svg%3E');
  animation: rotating 3s linear infinite
}

.egg {
  display: none
}

.egg + label {
  position: absolute;
  width: 5vw;
  height: 5vw;
  box-shadow: 0px 5px 5px 0px rgba(0,0,0,0.25);
  border-radius: 2.5vw 1.75vw;
  cursor: pointer;
  text-align:center;
  z-index: 999;
  transition: .25s ease-in-out
}

.egg:nth-of-type(odd) + label {
  background-color: yellow;
  background-image: url('data:image/svg+xml,%3Csvg width="52" height="26" viewBox="0 0 52 26" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%239C92AC" fill-opacity="0.4"%3E%3Cpath d="M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z" /%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.egg:nth-of-type(even) + label {
  background-color: pink;
  background-image: url('data:image/svg+xml,%3Csvg width="20" height="20" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%239C92AC" fill-opacity="0.4" fill-rule="evenodd"%3E%3Cpath d="M0 40L40 0H20L0 20M40 40V20L20 40"/%3E%3C/g%3E%3C/svg%3E');
}

@for $i from 1 through 3 {
  .egg__label:nth-of-type(#{$i}) {
    top: random(25) + 20 + vw;
    right: random(20) + 50 + vw;
    transform: rotate(random(360) + deg)
  }
}

@for $i from 4 through 6 {
  .egg__label:nth-of-type(#{$i}) {
    top: random(25) + 20 + vw;
    left: random(20) + 50 + vw;
    transform: rotate(random(360) + deg)
  }
}

.egg:checked + label {
  background-color: #1A237E;
  box-shadow: inset 0px 0px 5px 0px rgba(255,255,255,0.75);
}

.egg:nth-of-type(1):checked + label {
  top: 25vw;
  right: 0vw
}

.egg:nth-of-type(2):checked + label {
  top: 10vw;
  right: 4vw
}

.egg:nth-of-type(3):checked + label {
  top: 1vw;
  right: 15vw
}

.egg:nth-of-type(4):checked + label {
  top: 1vw;
  left: 15vw
}

.egg:nth-of-type(5):checked + label {
  top: 10vw;
  left: 4vw
}

.egg:nth-of-type(6):checked + label {
  top: 25vw;
  left: 0vw
}

.eastergate__gate {
  position: absolute;
  bottom: 5vw;
  left: 5vw;
  width: 40vw;
  height: 40vw;
  max-height: 85vh;
  border: 2px solid #fff;
  border-radius: 20vw;
  background-color: #000;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 4 4"%3E%3Cpath fill="#000000" fill-opacity="0.8" d="M1 3h1v1H1V3zm2-2h1v1H3V1z"%3E%3C/path%3E%3C/svg%3E');
  transition: .25s ease
}

.egg:checked + label + input:checked + label + input:checked + label + input:checked + label + input:checked + label + input:checked + label + .eastergate__gate {
  opacity: 0
}

.walkway {
  position: absolute;
  bottom: 0vw;
  left: 25vw;
  width: 20vw;
  border-right: 15vw solid transparent;
  border-bottom: 16vw solid #212121;
  border-left: 15vw solid transparent;
  z-index: 100
}

.walkway__shadow {
  position: absolute;
  top: 0vw;
  left: 0vw;
  width: 25vw;
  height: 1px;
  box-shadow: 0px 5px 50px 2px rgba(0,0,0,0.75)
}

@-webkit-keyframes rotating {
    from{
        -webkit-transform: rotate(0deg);
    }
    to{
        -webkit-transform: rotate(360deg);
    }
}
            
          
!
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