cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

            
              
<div class="goobutton">
  <div class="gootext">
    button
  </div>
  <div class="goocontainer">
    <div class="blob"></div>
    <div class="blob"></div>
    <div class="blob"></div>
    <div class="blob"></div>
  </div>
</div>
<svg xmls="http://www.w3.org/2000/svg" version="1.1" >
  <filter id="goo">
    <fegaussianblur in="SourceGraphic" stdDeviation="10" result="blur"></fegaussianblur>
    <fecolormatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 18 -7" result="goo"></fecolormatrix>
    <feblend in="SourceGraphic" in2="goo"></feblend>
  </filter>
</svg>


<br>
• Disecting the button from: <a target="_blank" href="http://2015.isl.co/">2015.isl.co</a>
<br>
<br> • This "gooey" effect works thanks to an an SVG filter. This article does a decent job of explaining what is necessary to create this effect.  <a target="_blank" href="https://css-tricks.com/gooey-effect/"> https://css-tricks.com/gooey-effect/</a><br><br>
• “...not all browsers support [SVG filters] being applied to regular DOM elements, notably Safari. However, they do work at least on Firefox and Chrome, even the Android version...”

            
          
!
            
              /* Just realized they're using an SVG filter... need to learn this: https://css-tricks.com/gooey-effect/ */

body {
  background-image: url("http://2015.isl.co/img/isl-yir-intro-7480337676.jpg");
  background-size: cover;
  color: #fff;
  font-family: sans-serif;
  margin-top: 100px;
}

a {
  color: #ffd615;
}

.goobutton {
  position: absolute;
  left: 0;
  right: 0;
  width: 160px;
  height: 60px;
  border: 7px solid #ffd615;
  margin: auto;
  overflow: hidden;
}

.gootext {
  position: absolute;
  top: 20px;
  color: #fff;
  z-index: 100;
  text-align: center;
  left: 0;
  right: 0;
  margin: auto;
  font-family: "Roboto", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.goocontainer {
  width: 100%;
  height: 100%;
  position: absolute;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: -1;
  filter: url('#goo');
  -webkit-filter: url('#goo');
}

.blob {
  width: 30%;
  border-radius: 100%;
  position: absolute;
  display: block;
  background-color: #ffd615;
  transition: all .5s;
  height: 60px;
}

.blob:nth-child(1) {
  left: -5%;
  transition-delay: 0s;
  transform: scale(1.3) translateY(125%) translateZ(0);
}

.goobutton:hover .blob:nth-child(1) {
  transform: scale(1.3) translateY(0px) translateZ(0);
}

.blob:nth-child(2) {
  left: 20%;
  transition-delay: 50ms;
  transform: scale(1.3) translateY(125%) translateZ(0) rotate(0deg);
}

.goobutton:hover .blob:nth-child(2) {
  transition-delay: .1s;
  transform: scale(1.6) translateY(0) translateZ(0) rotate(25deg);
}

.blob:nth-child(3) {
  left: 45%;
  transition-delay: 25ms;
  transform: scale(1.6) translateY(125%) translateZ(0);
}

.goobutton:hover .blob:nth-child(3) {
  transition-delay: 50ms;
  transform: scale(1.6) translateY(0) translateZ(0);
}

.blob:nth-child(4) {
  left: 75%;
  transition-delay: 50ms;
  transform: scale(1.6) translateY(125%) translateZ(0) rotate(0);
}

.goobutton:hover .blob:nth-child(4) {
  transition-delay: 120ms;
  transform: scale(1.6) translateY(0) translateZ(0) rotate(-25deg);
}
            
          
!
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