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.

            
              <div class="sutc-2018">
  <div class="confetti">
    <div id="confetti-scene" class="scene">
      <div class="layer" data-depth="0.08">
        <svg class="confetti--curly rotate" width="46" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M20.757 37.199c-2.466 3.157-6.815 1.852-10.655.7-1.825-.548-5.219-1.567-5.782-.846l-.017.022a2.268 2.268 0 0 1-3.589-2.774l.037-.048c2.467-3.157 6.815-1.851 10.655-.7 1.825.549 5.22 1.567 5.782.846l.003-.003c.555-.726-1.323-3.74-2.331-5.36-2.13-3.42-4.545-7.296-2.086-10.513l.037-.048c2.467-3.157 6.816-1.852 10.655-.7 1.825.548 5.22 1.567 5.783.846l.002-.004c.556-.727-1.322-3.741-2.33-5.36-2.13-3.42-4.545-7.297-2.085-10.515l.037-.048c2.466-3.157 6.816-1.852 10.655-.7 1.825.548 5.22 1.566 5.783.845a2.268 2.268 0 0 1 3.606 2.752l-.037.048c-2.467 3.156-6.816 1.852-10.655.7-1.825-.548-5.22-1.566-5.783-.845l-.003.003c-.556.727 1.322 3.742 2.331 5.361 2.13 3.42 4.544 7.296 2.085 10.514l-.037.048c-2.467 3.157-6.816 1.852-10.656.7-1.825-.548-5.219-1.566-5.782-.846l-.002.003c-.556.726 1.322 3.74 2.331 5.36 2.13 3.42 4.545 7.296 2.085 10.514a2.736 2.736 0 0 1-.037.048" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.1">
        <svg class="confetti--bigHalfCircle" width="24" height="28" xmlns="http://www.w3.org/2000/svg"><path d="M9.278 28c-2.676 0-5.305-.729-7.633-2.153l-.767-.501a1.944 1.944 0 0 1 2.132-3.253l.68.446c5.067 3.09 11.706 1.488 14.805-3.576 3.102-5.068 1.502-11.718-3.57-14.822l-.874-.565A1.944 1.944 0 0 1 16.166.313l.806.523c6.887 4.226 9.057 13.264 4.84 20.157A14.67 14.67 0 0 1 9.277 28v-.704V28z" fill="#6871FF" fill-rule="nonzero" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.06">
        <svg class="confetti--bigcircle" width="31" height="31" xmlns="http://www.w3.org/2000/svg"><path d="M27.91 15.533h.01-.01zM15.451 6A9.395 9.395 0 0 0 8.81 8.727 9.39 9.39 0 0 0 6 15.395a9.387 9.387 0 0 0 2.726 6.703 9.392 9.392 0 0 0 6.668 2.811h.061c5.185 0 9.421-4.202 9.454-9.395a9.392 9.392 0 0 0-2.728-6.703A9.391 9.391 0 0 0 15.513 6h-.06zm.003 24.91l-.098-.001a15.344 15.344 0 0 1-10.899-4.595A15.342 15.342 0 0 1 0 15.358a15.349 15.349 0 0 1 4.595-10.9A15.352 15.352 0 0 1 15.451 0h.1a15.357 15.357 0 0 1 10.9 4.595 15.363 15.363 0 0 1 4.458 10.957c-.055 8.489-6.978 15.358-15.454 15.358z" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.1">
        <svg class="confetti--halfCircle" width="20" height="19" xmlns="http://www.w3.org/2000/svg"><path d="M13.108 17.956l-.015-.012a3 3 0 0 1-.49-4.214 4.506 4.506 0 0 0-.736-6.322c-.938-.706-2.12-1.08-3.313-.94a4.467 4.467 0 0 0-3.009 1.677 3 3 0 0 1-4.2.502l-.014-.012A3 3 0 0 1 .84 4.422 10.436 10.436 0 0 1 7.859.507c2.786-.324 5.507.474 7.73 2.196 4.54 3.593 5.31 10.21 1.719 14.75a3 3 0 0 1-4.2.503" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.12">
        <svg class="confetti--triangle rotate117" width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M18.475 0L1.428.575C.138.618-.478 2.18.435 3.092l16.473 16.473c.912.913 2.473.296 2.517-.993L20 1.525A1.476 1.476 0 0 0 18.475 0" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.12">
        <svg class="confetti--triangle rotate26" width="22" height="21" xmlns="http://www.w3.org/2000/svg"><path d="M1.29 1.521L.673 18.567c-.047 1.29 1.468 2.013 2.442 1.166L20.697 4.45c.974-.847.468-2.447-.816-2.581L2.916.107A1.476 1.476 0 0 0 1.29 1.521" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
       <div class="layer" data-depth="0.06">
         <svg class="confetti--circle" width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M17.977 10.005h.007-.007zm-8.024-6.14c-1.612 0-3.129.623-4.278 1.756a6.048 6.048 0 0 0-1.81 4.295 6.046 6.046 0 0 0 1.756 4.318 6.05 6.05 0 0 0 4.295 1.81h.04a6.098 6.098 0 0 0 6.089-6.051 6.05 6.05 0 0 0-1.757-4.318 6.05 6.05 0 0 0-4.295-1.81h-.04zm.002 16.045h-.063a9.884 9.884 0 0 1-7.02-2.96A9.882 9.882 0 0 1 0 9.893a9.886 9.886 0 0 1 2.96-7.021A9.889 9.889 0 0 1 9.953 0h.064a9.892 9.892 0 0 1 7.021 2.96 9.896 9.896 0 0 1 2.872 7.057c-.036 5.468-4.495 9.893-9.955 9.893z" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.1">
        <svg class="confetti--circleSecond"width="20" height="25" xmlns="http://www.w3.org/2000/svg"><path d="M14.683 24.113a1.987 1.987 0 0 1-.394-2.32 12.32 12.32 0 0 0 1.297-5.934 12.218 12.218 0 0 0-3.897-8.575 12.223 12.223 0 0 0-8.818-3.308l-.107.004A1.986 1.986 0 1 1 2.63.01l.107-.004A16.17 16.17 0 0 1 14.4 4.382a16.18 16.18 0 0 1 5.155 11.343 16.302 16.302 0 0 1-1.718 7.852 1.986 1.986 0 0 1-3.155.536" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.06">
       <svg class="confetti--triangle right" width="19" height="25" xmlns="http://www.w3.org/2000/svg"><path d="M.26 9.435L7.174 22.91c.943 1.837 3.623 1.664 4.322-.279l6.998-19.466c.699-1.944-1.258-3.784-3.154-2.967L1.427 6.189A2.36 2.36 0 0 0 .261 9.435" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.12">
        
      </div>
      <div class="layer" data-depth="0.1">
        <svg class="confetti--halfCirclebottom" width="20" height="19" xmlns="http://www.w3.org/2000/svg"><path d="M13.108 17.956l-.015-.012a3 3 0 0 1-.49-4.214 4.506 4.506 0 0 0-.736-6.322c-.938-.706-2.12-1.08-3.313-.94a4.467 4.467 0 0 0-3.009 1.677 3 3 0 0 1-4.2.502l-.014-.012A3 3 0 0 1 .84 4.422 10.436 10.436 0 0 1 7.859.507c2.786-.324 5.507.474 7.73 2.196 4.54 3.593 5.31 10.21 1.719 14.75a3 3 0 0 1-4.2.503" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.08">
        <svg class="confetti--curly rotatebottom" width="46" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M20.757 37.199c-2.466 3.157-6.815 1.852-10.655.7-1.825-.548-5.219-1.567-5.782-.846l-.017.022a2.268 2.268 0 0 1-3.589-2.774l.037-.048c2.467-3.157 6.815-1.851 10.655-.7 1.825.549 5.22 1.567 5.782.846l.003-.003c.555-.726-1.323-3.74-2.331-5.36-2.13-3.42-4.545-7.296-2.086-10.513l.037-.048c2.467-3.157 6.816-1.852 10.655-.7 1.825.548 5.22 1.567 5.783.846l.002-.004c.556-.727-1.322-3.741-2.33-5.36-2.13-3.42-4.545-7.297-2.085-10.515l.037-.048c2.466-3.157 6.816-1.852 10.655-.7 1.825.548 5.22 1.566 5.783.845a2.268 2.268 0 0 1 3.606 2.752l-.037.048c-2.467 3.156-6.816 1.852-10.655.7-1.825-.548-5.22-1.566-5.783-.845l-.003.003c-.556.727 1.322 3.742 2.331 5.361 2.13 3.42 4.544 7.296 2.085 10.514l-.037.048c-2.467 3.157-6.816 1.852-10.656.7-1.825-.548-5.219-1.566-5.782-.846l-.002.003c-.556.726 1.322 3.74 2.331 5.36 2.13 3.42 4.545 7.296 2.085 10.514a2.736 2.736 0 0 1-.037.048" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
      <div class="layer" data-depth="0.08">
        <svg class="confetti--curly bottom" width="46" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M20.757 37.199c-2.466 3.157-6.815 1.852-10.655.7-1.825-.548-5.219-1.567-5.782-.846l-.017.022a2.268 2.268 0 0 1-3.589-2.774l.037-.048c2.467-3.157 6.815-1.851 10.655-.7 1.825.549 5.22 1.567 5.782.846l.003-.003c.555-.726-1.323-3.74-2.331-5.36-2.13-3.42-4.545-7.296-2.086-10.513l.037-.048c2.467-3.157 6.816-1.852 10.655-.7 1.825.548 5.22 1.567 5.783.846l.002-.004c.556-.727-1.322-3.741-2.33-5.36-2.13-3.42-4.545-7.297-2.085-10.515l.037-.048c2.466-3.157 6.816-1.852 10.655-.7 1.825.548 5.22 1.566 5.783.845a2.268 2.268 0 0 1 3.606 2.752l-.037.048c-2.467 3.156-6.816 1.852-10.655.7-1.825-.548-5.22-1.566-5.783-.845l-.003.003c-.556.727 1.322 3.742 2.331 5.361 2.13 3.42 4.544 7.296 2.085 10.514l-.037.048c-2.467 3.157-6.816 1.852-10.656.7-1.825-.548-5.219-1.566-5.782-.846l-.002.003c-.556.726 1.322 3.74 2.331 5.36 2.13 3.42 4.545 7.296 2.085 10.514a2.736 2.736 0 0 1-.037.048" fill="#6871FF" fill-rule="evenodd" opacity=".3"/></svg>
      </div>
    </div>
  </div>
  <div class="hero">
    <div class="sutc-image">
      <img src="https://drive.google.com/uc?export=view&id=132x6ma3fyhuHG2a0drOe2QalkA_-XDB1">
    </div>
  </div>
</div>
            
          
!
            
              *,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  margin: 0;
}

.sutc-2018 {
  position: relative;
  overflow: hidden;
}

.sutc-image img {
  width: 250px;
}

.layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.confetti {
  position: absolute;
  left: 30px;
  right: 30px;
  top: 30px;
  bottom: 30px;
}

.confetti .scene,
.confetti .layer {
  width: 100%;
  height: 100%;
}

.hero {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* confetti layers */
.layer svg {
  position: absolute;
}

.confetti--curly.rotate {
  top: -1%;
  left: 19%;
  transform: rotate(86deg);
  animation: float 3s infinite;
}

.confetti--bigHalfCircle {
  top: 5%;
  left: 34%;
  animation: rotation 4s infinite;
}

.confetti--bigcircle {
  top: 6%;
  right: 30%;
  animation: floatCircleTer 4s infinite;
}

.confetti--halfCircle {
  top: 9%;
  left: 8%;
  animation: rotationSec 4s infinite;
}

.confetti--triangle.rotate117 {
  top: 12.5%;
  right: 3%;
  transform: rotate(117deg);
  animation: vibrate-2 2s linear infinite both;
}

.confetti--triangle.rotate26 {
  top: 16%;
  left: 47%;
  transform: rotate(26deg);
  animation: vibrate-1 2s linear infinite both;
}

.confetti--circle {
  top: 36%;
  left: 5%;
  animation: floatCircleSec 4s infinite;
}

.confetti--halfCircle2 {
  right: 5%;
  top: 39%;
  animation: rotation 4s infinite;
}

.confetti--circleSecond {
  bottom: 27%;
  right: 2.7%;
  animation: floatCircleQuat 4s infinite;
}

.confetti--triangle.right {
  bottom: 22.5%;
  left: 3%;
  animation: vibrate-3 2s linear infinite both;
}

.confetti--halfCirclebottom {
  bottom: 20%;
  left: 48%;
  animation: rotation 4s infinite;
}

.confetti--curly.rotatebottom {
  bottom: 16%;
  right: 14.5%;
  transform: rotate(86deg);
  animation: floatSec 3s infinite;
}

.confetti--curly.bottom {
  bottom: 0px;
  left: 26%;
  animation: floatTer 3s infinite;
}

/* Key frame animations */
@keyframes float {
  0%,
  to {
    transform: translate(0) rotate(0deg);
  }
  50% {
    transform: translate(10px, 5px) rotate(5deg);
  }
}

@keyframes floatTer {
  0%,
  to {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(7deg) scale(0.97);
  }
}

@keyframes floatSec {
  0%,
  to {
    transform: translate(0) scale(1);
  }
  50% {
    transform: translate(-5px, -10px) scale(1.02);
  }
}

@keyframes floatCircleTer {
  0%,
  to {
    transform: translate(0) scale(1);
  }
  50% {
    transform: translate(-12%, -18%) scale(0.6);
  }
}

@keyframes floatCircleSec {
  0%,
  to {
    transform: translate(0) scale(1);
  }
  50% {
    transform: translate(-10%, -21%) scale(1.2);
  }
}

@keyframes floatCircleQuat {
  0%,
  to {
    transform: translate(-12%, -18%) scale(0.6);
  }
  50% {
    transform: translate(0) scale(1);
  }
}

@keyframes rotation {
  0%,
  to {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-90deg);
  }
}

@keyframes rotationSec {
  0%,
  to {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(105deg);
  }
}

@keyframes vibrate-1 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes vibrate-2 {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(2px, -2px);
  }
  40% {
    transform: translate(2px, 2px);
  }
  60% {
    transform: translate(-2px, 2px);
  }
  80% {
    transform: translate(-2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes vibrate-3 {
  0% {
    transform: translate(0);
  }
  10% {
    transform: translate(-2px, -2px);
  }
  20% {
    transform: translate(2px, -2px);
  }
  30% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(2px, 2px);
  }
  50% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, -2px);
  }
  70% {
    transform: translate(-2px, 2px);
  }
  80% {
    transform: translate(-2px, -2px);
  }
  90% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

            
          
!
            
              /**
**  Smart Urban Technology Challenge 2018
**  https://kathmanduchallenge.org/
**  #youngInovation #work #throwback
**  http://younginnovations.com.np/
**/

$(function() {
  var scene = document.getElementById("confetti-scene");
  if (scene) {
    var parallaxInstance = new Parallax(scene);
  }
  var herotilt = $(".sutc-image");
  if (herotilt.length > 0) {
    herotilt.tilt({
      scale: 1,
      speed: 500,
      perspective: 1500,
      maxTilt: 20,
      glare: false
    });
  }
});

            
          
!
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