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="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...”

              
            
!

CSS

              
                /* 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);
}
              
            
!

JS

              
                
              
            
!
999px

Console