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

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.

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="container">

  <!-- white logo -->
  <svg class="header__logo header-primaryLogo" id="tmrppl-white-logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="74.511" height="78.052" viewBox="0 0 74.511 78.052">
    <defs>
      <clipPath id="clip-path">
        <path id="Path_2" data-name="Path 2" d="M52.935,28.12,29.117,13.24,17.2,20.665V35.576l23.834,14.9V80.264l11.9,7.44,11.917-7.44V50.472l23.834-14.9V20.665L76.768,13.24Z" transform="translate(-17.2 -13.24)"/>
      </clipPath>
      <clipPath id="clip-path-2">
        <rect id="Rectangle_8" data-name="Rectangle 8" width="74.511" height="78.052"/>
      </clipPath>
    </defs>
    <g id="TP_-_Logo_white" data-name="TP - Logo white" transform="translate(-16.23 -12.08)">
      <g id="Group_12" data-name="Group 12" transform="translate(17.743 13.889)">
        <g id="Group_11" data-name="Group 11">
          <g id="Group_10" data-name="Group 10">
            <g id="Group_9" data-name="Group 9" clip-path="url(#clip-path)">
              <path id="Path_1" data-name="Path 1" d="M83.923,90.923l11.917,7.44v-14.9Zm11.917-7.44v14.9l11.917-7.44Zm11.9,7.44v-14.9l-11.917,7.44Zm-11.9-7.44,11.917-7.44L95.839,68.6v14.88ZM83.923,76.027v14.9l11.917-7.44Zm0,0,11.917,7.44v-14.9Zm-47.652,14.9,11.917,7.44v-14.9Zm11.917-7.44v14.9L60.1,90.939Zm11.9,7.44v-14.9l-11.917,7.44Zm-11.9-7.44L60.1,76.043,48.188,68.6ZM36.271,76.027v14.9l11.917-7.44Zm0,0,11.917,7.44v-14.9Zm47.652-14.9,11.917,7.44v-14.9Zm11.917-7.44v14.9l11.917-7.44Zm11.9,7.44v-14.9l-11.917,7.44Zm0-14.9L95.824,38.8v14.9Zm-23.818,0h0v14.9l11.917-7.44ZM95.839,38.8l-11.917,7.44,11.917,7.44ZM36.271,61.131l11.917,7.44v-14.9Zm11.917-7.44v14.9L60.1,61.147Zm11.9,7.44v-14.9l-11.917,7.44Zm0-14.9L48.172,38.8v14.9Zm-23.818,0h0v14.9l11.917-7.44ZM48.188,38.8l-11.917,7.44,11.917,7.44ZM95.839,23.883l-11.917,7.44,11.917,7.44Zm11.9,7.456h0L95.824,23.883v14.9Zm0,0V16.459L95.824,23.9Zm0-14.88L95.839,9v14.88ZM83.923,31.339,95.839,23.9l-11.917-7.44ZM95.839,8.987l-11.917,7.44,11.917,7.456Zm-47.652,14.9-11.917,7.44,11.917,7.44Zm11.9,7.456h0l-11.9-7.456v14.9Zm0,0Zm0,0V16.459L48.172,23.9Zm0-14.88L48.188,9v14.88ZM36.271,31.339,48.188,23.9l-11.917-7.44ZM48.188,8.987l-11.917,7.44,11.917,7.456ZM72.006,98.379l4.149,2.589h7.768V90.923Zm0,0,11.917-7.44L72.006,83.5ZM60.089,90.923v10.045h7.768l4.149-2.589Zm0,0,11.917,7.44v-14.9ZM24.354,98.379l4.149,2.589h7.768V90.923Zm0,0,11.917-7.44L24.354,83.5Zm-11.9-7.456v10.045h7.768l4.149-2.589Zm0,0,11.917,7.44v-14.9Zm47.636-14.9,11.917,7.44v-14.9Zm11.917,7.456,11.917-7.44L72.006,68.6Zm0-14.9,11.917,7.44v-14.9Zm0,0,11.917-7.44-11.917-7.44ZM60.089,61.131v14.9l11.917-7.44Zm0,0,11.917,7.44v-14.9ZM24.354,68.587l-11.917,7.44,11.917,7.44Zm0,14.9,11.917-7.44L24.354,68.6Zm0-14.9,11.917,7.44v-14.9Zm0-14.9v14.9l11.917-7.44Zm-11.9,7.44v14.9l11.917-7.44Zm11.9-7.44-11.917,7.44,11.917,7.44ZM72.006,38.8l-11.917,7.44,11.917,7.44Zm11.917,7.44h0L72.006,38.8v14.9Zm0,0v-14.9l-11.917,7.44Zm0-14.9L72.006,23.9V38.8Zm-23.834,14.9L72.006,38.8l-11.917-7.44ZM72.006,23.883l-11.917,7.44,11.917,7.44ZM24.354,38.8l-11.917,7.44,11.917,7.44Zm11.917,7.44L24.354,38.8v14.9Zm0-14.9-11.917,7.44,11.917,7.44ZM24.354,23.883v14.9l11.917-7.44Zm-11.9,7.456v14.9L24.37,38.8Zm11.9-7.456-11.917,7.44,11.917,7.44Zm47.652-14.9-11.917,7.44,11.917,7.456Zm11.917,7.471h0L72.006,9v14.88Zm0-.016V7.49h-9.5l-2.4,1.5Zm0,.016Zm-23.834,0,11.917-7.44L69.588,7.506h-9.5v8.953ZM24.354,8.987l-11.9,7.456,11.917,7.44C24.354,23.9,24.354,8.987,24.354,8.987Zm11.917,7.471h0L24.354,8.987v14.9Zm0-.016V7.49h-9.5l-2.418,1.5Zm0,.016Zm-23.818,0L24.37,9.019,21.952,7.506h-9.5ZM60.089,46.235v14.9l11.917-7.44ZM83.923,16.459h0L72.006,23.9l11.917,7.44Zm-47.652,0h0L24.354,23.9l11.917,7.44ZM83.923,90.923v10.045H91.69l4.149-2.589Zm-23.834,0-11.917,7.44,4.149,2.589h7.768V90.923ZM36.271,61.131v14.9l11.917-7.44ZM48.188,38.8l-11.917-7.44v14.9ZM12.453,76.027v14.9l11.917-7.44Zm47.636,0v14.9l11.917-7.44ZM12.453,46.235v14.9l11.917-7.44Zm0-29.776v14.9h0l11.917-7.44Zm95.288,0V7.49h-9.5l-2.4,1.5Zm0,74.464-11.917,7.44,4.149,2.589h7.768V90.923ZM36.271,16.459,48.188,9l-2.4-1.5h-9.5l-.016,8.953Zm47.652,0,11.917-7.44-2.4-1.513h-9.5l-.016,8.953Zm-23.834,0V7.49h-9.5l-2.4,1.5ZM72.006,83.483l11.917,7.44v-14.9ZM95.839,38.8l11.917,7.44v-14.9h0Zm-59.568,7.44h0l-11.917,7.44,11.917,7.44ZM95.839,38.8l-11.917-7.44v14.9ZM36.271,90.923v10.045h7.768l4.149-2.589ZM83.923,46.235l-11.917,7.44,11.917,7.44ZM24.354,83.483l11.917,7.44v-14.9Zm83.386-22.352-11.917,7.44,11.917,7.44Zm-47.652,0-11.917,7.44,11.917,7.44Zm23.834,0v14.9l11.917-7.44ZM48.188,38.8,60.1,46.235v-14.9h0Zm11.9-7.456L72.006,23.9l-11.917-7.44v14.88ZM4.42,7.49H167.309v93.478H4.42Z" transform="translate(-24.354 -16.459)" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="0.261"/>
            </g>
          </g>
        </g>
      </g>
      <g id="Group_16" data-name="Group 16" transform="translate(16.23 12.08)">
        <g id="Group_15" data-name="Group 15">
          <g id="Group_14" data-name="Group 14">
            <g id="Group_13" data-name="Group 13" clip-path="url(#clip-path-2)">
              <path id="Path_3" data-name="Path 3" d="M17.2,20.665V35.576l23.834,14.9V80.264l11.9,7.44,11.917-7.44V50.472l23.834-14.9V20.665L76.768,13.24,52.935,28.12,29.117,13.24Z" transform="translate(-15.687 -11.431)" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="1.946"/>
            </g>
          </g>
        </g>
      </g>
    </g>
  </svg>


  
  <!-- animated logo -->
    <svg class="header__logo header-secondaryLogo" version="1.1" id="tmrwppl-logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500" xml:space="preserve">

      <polygon id="tri9" class="tri" points="174.5,157.8 248.3,115.1 248.3,200.4 " />
      <polygon id="tri10" class="tri" points="172.5,161.1 246.3,203.8 172.5,246.3 " />
      <polygon id="tri12" class="tri" points="252.3,115 326.2,157.6 252.3,200.3 " />
      <polygon id="tri13" class="tri" points="174.5,249.7 248.3,207.1 248.3,292.4 " />
      <polygon id="tri17" class="tri" points="254.3,203.6 328.2,161 328.2,246.1 " />
      <polygon id="tri18" class="tri" points="252.3,206.9 326.2,249.6 252.3,292.2 " />

      <polygon id="tri7" class="tri" points="172.5,69 246.3,111.7 172.5,154.3 " />
      <polygon id="tri8" class="tri" points="94.6,203.7 168.5,161 168.5,246.4 " />
      <polygon id="tri11" class="tri" points="254.3,111.5 328.2,68.9 328.2,154.2 " />
      <polygon id="tri23" class="tri" points="332.2,160.9 406.1,203.5 332.2,246.2 " />
      <polygon id="tri14" class="tri" points="172.5,253.2 246.3,295.8 172.5,338.3 " />
      <polygon id="tri24" class="tri" points="254.3,295.7 328.2,253 328.2,338.1 " />

      <polygon id="tri5" class="tri" points="94.6,111.7 168.5,69 168.5,154.3 " />
      <polygon id="tri6" class="tri" points="92.6,115.1 166.5,157.8 92.6,200.2 " />
      <polygon id="tri16" class="tri" points="332.2,68.9 406.1,111.5 332.2,154.2 " />
      <polygon id="tri22" class="tri" points="334.2,157.6 408.1,115 408.1,200.1 " />
      <polygon id="tri19" class="tri" points="174.5,341.8 248.3,299.1 248.3,384.4 " />
      <polygon id="tri25" class="tri" points="252.3,298.9 326.2,341.6 252.3,384.3 " />

      <polygon id="tri3" class="tri" points="92.6,22.9 166.5,65.5 92.6,108.2 " />
      <polygon id="tri4" class="tri" points="14.7,157.4 88.6,114.8 88.6,200.1 " />
      <polygon id="tri15" class="tri" points="334.2,65.4 408.1,22.7 408.1,108 " />
      <polygon id="tri28" class="tri" points="412.1,114.6 486,157.3 412.1,199.9 " />
      <polygon id="tri20" class="tri" points="172.5,345.2 246.3,387.9 172.5,430.3 " />
      <polygon id="tri29" class="tri" points="254.3,387.7 328.2,345.1 328.2,430.2 " />

      <polygon id="tri21" class="tri" points="412.1,22.7 486,65.4 412.1,108 " />
      <polygon id="tri27" class="tri" points="414.1,111.3 488,68.7 488,153.8 " />
      <polygon id="tri26" class="tri" points="174.5,433.8 248.3,391.3 248.3,476.4 " />
      <polygon id="tri30" class="tri" points="252.3,391.2 326.2,433.6 252.3,476.3 " />
      <polygon id="tri1" class="tri" points="14.7,65.5 88.6,22.9 88.6,108.2 " />
      <polygon id="tri2" class="tri" points="12.7,68.9 86.6,111.5 12.7,154 " />

      <polygon id="star" class="star" points="250.5,124.9 272.1,168.7 320.5,175.8 285.5,209.9 293.7,258 250.5,235.3 207.3,258
    215.5,209.9 180.5,175.8 228.9,168.7 " />

      </div>
              
            
!

CSS

              
                :root {
  --black: #000000;
  --yellow: #FFF56D;
}

body {
  background: var(--black);
}

.container{
  position: relative;
}

.header__logo{
  position: absolute;
  top: 0;
  left: 0;
  width: 74.511px;
  height: 78.052px;
  overflow: visible;
}

.header-primaryLogo{
  position: relative;
  z-index: 1;
}

/*
* for animated logo
*/

.star {
  dispay: none;
  fill: none;
}

.tri {
  fill: var(--yellow);
  opacity: 0;
}

              
            
!

JS

              
                const primaryLogo = document.querySelector(".header-primaryLogo");

var tl = gsap.timeline({
  paused: true
  // zIndex: 1,
});

// initial state
tl.set(".tri", {
  scale: 0,
  rotate: "0",
  transformOrigin: "50% 50%"
});

// the animation
tl.to(primaryLogo, {
  duration: 0.1,
  opacity: 0,
  ease: "power1.inOut"
});

tl.to(".tri", {
  duration: 0.4,
  opacity: 1,
  scale: 1,
  rotate: 0,
  ease: "power1.inOut",
  stagger: {
    amount: 0.3
  }
});

/*
 * play animation on primary logo hover
 */

primaryLogo.addEventListener("mouseenter", playLogo);
// primaryLogo.addEventListener("mouseleave", rewindLogo);

function playLogo() {
  if (!tl.isActive()) {
    tl.play(0);
    // tl.reverse();
    // tl.reversed() ? tl.play(0) : tl.reverse();
  }
}

// function rewindLogo() {
//   if (!tl.isActive()) {
//     tl.reverse();
//   }
// }

              
            
!
999px

Console