Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="absolute inset-0 flex flex-col justify-center items-center space-y-20">

  <div class="flex justify-center items-center space-x-20">
    <div class="spinningasset coin">
      <div>
        <div></div>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <em></em>
        <em></em>
        <div></div>
      </div>
    </div>

    <div class="spinningasset token">
      <div>
        <div></div>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <em></em>
        <em></em>
        <div></div>
      </div>
    </div>

    <!--
  <div class="spinningasset ticket">
    <div>
      <div></div>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <i></i>
      <em></em>
      <em></em>
      <div></div>
    </div>
  </div>
-->

    <div class="spinningasset ticket2">
      <div>
        <div></div>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <i></i>
        <em></em>
        <em></em>
        <div></div>
      </div>
    </div>
  </div>

  <div class="flex space-x-4">
    <div class="card">
      <div class="card-content p-0 flex">
        <div class="spinningasset coin is-sm">
          <div>
            <div></div>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <em></em>
            <em></em>
            <div></div>
          </div>
        </div>
        <div class="ml-2">
          12
        </div>
      </div>
    </div>
    <div class="card">
      <div class="card-content p-0 flex">
        <div class="spinningasset token is-sm">
          <div>
            <div></div>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <em></em>
            <em></em>
            <div></div>
          </div>
        </div>
        <div class="ml-2">
          8
        </div>
      </div>
    </div>
    <div class="card">
      <div class="card-content p-0 flex">
        <div class="spinningasset ticket2 is-sm">
          <div>
            <div></div>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <i></i>
            <em></em>
            <em></em>
            <div></div>
          </div>
        </div>
        <div class="ml-2">
          3
        </div>
      </div>
    </div>
  </div>

</div>
              
            
!

CSS

              
                /*----------------------------*/
/* GENERAL */
/*----------------------------*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;700&display=swap");

html {
  background: #1a1b3a;
  font-size: 16px;
  font-family: "Roboto Condensed", sans-serif;
}

body {
  color: white;
  &::before {
    content: "";
    position: absolute;
    inset: 40% -60% 0 -60%;
    background-image: radial-gradient(
      ellipse at bottom,
      rgb(88 88 162) 0%,
      rgb(88 88 162 / 0%) 50%
    );
    opacity: 0.3;
    pointer-events: none;
  }
}

/*----------------------------*/
/* SPINNING OBJECTS */
/*----------------------------*/

@keyframes brightness {
  0%,
  50%,
  100% {
    filter: blur(0px) brightness(120%)
      drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.1))
      drop-shadow(0 0 5px rgba(255, 255, 255, 0.075))
      drop-shadow(0 0 7.5px rgba(255, 255, 255, 0.045))
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.025));
  }
  25%,
  75% {
    filter: blur(1px) brightness(50%)
      drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.1))
      drop-shadow(0 0 5px rgba(255, 255, 255, 0.075))
      drop-shadow(0 0 7.5px rgba(255, 255, 255, 0.045))
      drop-shadow(0 0 10px rgba(255, 255, 255, 0.025));
  }
}

@keyframes spin {
  0% {
    transform: rotateY(-180deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}
.spinningasset {
  text-align: left;
  transition: all 0.4s ease-out;
  cursor: pointer;
  animation: brightness 2.5s infinite linear;
  &::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 8px;
    width: 11px;
    margin: auto;
    background-size: 100px 400%;
    background-position: center;
  }
  > div {
    position: relative;
    z-index: 2;
    perspective: 10000px;
    transform-style: preserve-3d;
    transform-origin: center;
    animation: spin 2.5s infinite linear;
    > * {
      width: 100%;
      height: 100%;
      position: absolute;
      backface-visibility: inherit;
      background-size: cover;
    }

    > div:first-child {
      transform: translateZ(-6px);
    }
    > div:last-child {
      transform: translateZ(6px);
      background-image: url(https://gloot.netlify.app/images/prototype/Coins_side_front.svg);
    }
    em {
      filter: blur(0.5px);
      &:first-of-type {
        transform: translateZ(0px) rotateY(-6deg);
      }
      &:last-of-type {
        transform: translateZ(0px) rotateY(6deg);
      }
    }
    i {
      filter: blur(0.5px);
      &:nth-of-type(1) {
        transform: translateZ(-5px);
      }
      &:nth-of-type(2) {
        transform: translateZ(-4px);
      }
      &:nth-of-type(3) {
        transform: translateZ(-3px);
      }
      &:nth-of-type(4) {
        transform: translateZ(-2px);
      }
      &:nth-of-type(5) {
        transform: translateZ(-1px);
      }
      &:nth-of-type(6) {
        transform: translateZ(0px);
      }
      &:nth-of-type(7) {
        transform: translateZ(1px);
      }
      &:nth-of-type(8) {
        transform: translateZ(2px);
      }
      &:nth-of-type(9) {
        transform: translateZ(3px);
      }
      &:nth-of-type(10) {
        transform: translateZ(4px);
      }
      &:nth-of-type(11) {
        transform: translateZ(5px);
      }
    }
  }

  &.is-sm {
    width: 24px;
    height: 24px;
    transform: scale(0.24);
    transform-origin: left top;
    filter: none;
    &,
    > div {
    }
  }

  &.coin {
    > div {
      width: 100px;
      height: 100px;
      > div:first-child {
        background-image: url(https://gloot.netlify.app/images/prototype/Coins_side_back.svg);
      }
      > div:last-child,
      &::after,
      i,
      em {
        background-image: url(https://gloot.netlify.app/images/prototype/Coins_side_front.svg);
      }
    }
  }

  &.token {
    filter: drop-shadow(0 0 3px rgba(236, 121, 254, 0.3))
      drop-shadow(0 0 6px rgba(236, 121, 254, 0.2))
      drop-shadow(0 0 20px rgba(236, 121, 254, 0.1))
      drop-shadow(0 0 30px rgba(236, 121, 254, 0.05));
    &:hover {
      filter: drop-shadow(0 0 3px rgba(236, 121, 254, 0.8))
        drop-shadow(0 0 6px rgba(236, 121, 254, 0.6))
        drop-shadow(0 0 20px rgba(236, 121, 254, 0.4))
        drop-shadow(0 0 30px rgba(236, 121, 254, 0.2));
    }
    > div {
      width: 100px;
      height: 112px;
      > div:first-child {
        background-image: url(https://gloot.netlify.app/images/prototype/Tokens_side_back.svg);
      }
      > div:last-child,
      &::after,
      i,
      em {
        background-image: url(https://gloot.netlify.app/images/prototype/Tokens_side_front.svg);
      }
    }

    &.is-sm {
      transform: scale(0.24) translateY(-33%);
    }
  }

  &.ticket {
    transform: translate;
    filter: drop-shadow(0 0 3px rgba(250, 234, 148, 0.4))
      drop-shadow(0 0 6px rgba(250, 234, 148, 0.3))
      drop-shadow(0 0 20px rgba(250, 234, 148, 0.2))
      drop-shadow(0 0 30px rgba(250, 234, 148, 0.1));

    &:hover {
      filter: drop-shadow(0 0 3px rgba(250, 234, 148, 0.6))
        drop-shadow(0 0 6px rgba(250, 234, 148, 0.4))
        drop-shadow(0 0 20px rgba(250, 234, 148, 0.2))
        drop-shadow(0 0 30px rgba(250, 234, 148, 0.1));
    }
    > div {
      width: 150px;
      height: 80px;
      > div:first-child {
        transform: translateZ(-1px);
      }
      > div:last-child {
        transform: translateZ(1px);
      }
      i {
        display: none;
      }
      em {
        &:first-of-type {
          transform: translateZ(0px) rotateY(-1deg);
        }
        &:last-of-type {
          transform: translateZ(0px) rotateY(1deg);
        }
      }
      > div:first-child {
        background-image: url(https://gloot.netlify.app/images/prototype/ticket_side_back.svg);
      }
      > div:last-child,
      &::after,
      i,
      em {
        background-image: url(https://gloot.netlify.app/images/prototype/ticket_side_front.svg);
      }
    }
  }

  &.ticket2 {
    transform: translate;
    > div {
      width: 173px;
      height: 150px;
      > div:first-child {
        transform: translateZ(-1px);
      }
      > div:last-child {
        transform: translateZ(1px);
      }
      i {
        display: none;
      }
      em {
        &:first-of-type {
          transform: translateZ(0px) rotateY(-1deg);
        }
        &:last-of-type {
          transform: translateZ(0px) rotateY(1deg);
        }
      }
      > div:first-child {
        background-image: url(https://gloot.netlify.app/images/prototype/ticket_2_back.svg);
      }
      > div:last-child,
      &::after,
      i,
      em {
        background-image: url(https://gloot.netlify.app/images/prototype/ticket_2_front.svg);
      }
    }

    &.is-sm {
      width: 40px;
      transform: scale(0.24) translateY(-100%);
    }
  }
}

/*----------------------------*/
/* CARD */
/*----------------------------*/

.card {
  background: radial-gradient(
    100% 100% at 50% 5%,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 0.5rem;
  backdrop-filter: blur(4px);
  > div {
    position: relative;
    z-index: 2;
    background: #2d2d59;
    border-radius: 0.5rem;
    padding: 1rem;
    backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05),
      0 1.5px 1.1px rgba(0, 0, 0, 0.034), 0 3.6px 2.5px rgba(0, 0, 0, 0.048),
      0 6.8px 4.8px rgba(0, 0, 0, 0.06), 0 12.1px 8.5px rgba(0, 0, 0, 0.072),
      0 22.6px 15.9px rgba(0, 0, 0, 0.086), 0 54px 38px rgba(0, 0, 0, 0.12);
  }

  &.is-alt {
    background: transparent;
    border: none;
    > .card-content {
      background: #191a2f;
    }
    &::before,
    &::after {
      content: "";
      position: absolute;
      z-index: 1;
      top: 1.5rem;
      bottom: 1.5rem;
      width: 4rem;
      background: linear-gradient(to bottom, #00a6fb 0%, #00fddc 100%);
      border-radius: 0.25rem;
      transition: all 0.6s ease-out 0.22s;
    }
    &::before {
      left: 0;
      transform: translateX(1rem);
    }
    &::after {
      right: 0;
      transform: translateX(-1rem);
    }
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console