Pen Settings

HTML

CSS

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

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

              
                <svg class="bubbles" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 450 400.00001">
  <defs>
    <linearGradient id="g">
      <stop offset="0" stop-color="#e3fdff" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#e3fdff" stop-opacity=".784"/>
      <stop offset="1" stop-color="#acfaff" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="i">
      <stop offset="0" stop-color="#fffad3" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#fffad3" stop-opacity=".784"/>
      <stop offset="1" stop-color="#fff081" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="h">
      <stop offset="0" stop-color="#ffd7d3" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#ffd7d3" stop-opacity=".784"/>
      <stop offset="1" stop-color="#ff9f94" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="e">
      <stop offset="0" stop-color="#ffe8d3" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#ffe8d3" stop-opacity=".784"/>
      <stop offset="1" stop-color="#ffc28b" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="d">
      <stop offset="0" stop-color="#c7fbe6" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#c7fbe6" stop-opacity=".784"/>
      <stop offset="1" stop-color="#43f6ac" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="c">
      <stop offset="0" stop-color="#d3fcff" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#d3fcff" stop-opacity=".784"/>
      <stop offset="1" stop-color="#75f7ff" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="a">
      <stop offset="0" stop-color="#bfddff" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#bfddff" stop-opacity=".784"/>
      <stop offset="1" stop-color="#60abff" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="b">
      <stop offset="0" stop-color="#e0d9fd" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#e0d9fd" stop-opacity=".784"/>
      <stop offset="1" stop-color="#b9a9fb" stop-opacity=".784"/>
    </linearGradient>
    <linearGradient id="f">
      <stop offset="0" stop-color="#ebf7ff" stop-opacity=".784"/>
      <stop offset=".5" stop-color="#ebf7ff" stop-opacity=".784"/>
      <stop offset="1" stop-color="#afdeff" stop-opacity=".784"/>
    </linearGradient>
    <radialGradient id="r" cx="120.609" cy="745.077" r="100" xlink:href="#a" fx="120.609" fy="745.077" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.45255 0 0 1.45255 50.674 -151.11)"/>
    <radialGradient id="n" cx="120.609" cy="745.077" r="100" xlink:href="#b" gradientUnits="userSpaceOnUse" gradientTransform="translate(-40.483 108.745) scale(1.0894)" fx="120.609" fy="745.077"/>
    <radialGradient id="q" cx="120.609" cy="745.077" r="100" xlink:href="#c" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.27098 0 0 1.27098 227.77 -26.133)" fx="120.609" fy="745.077"/>
    <radialGradient id="p" cx="120.609" cy="745.077" r="100" xlink:href="#d" gradientUnits="userSpaceOnUse" gradientTransform="matrix(.90784 0 0 .90784 36.462 170.084)" fx="120.609" fy="745.077"/>
    <radialGradient id="o" cx="120.609" cy="745.077" r="100" xlink:href="#e" gradientUnits="userSpaceOnUse" gradientTransform="matrix(.72627 0 0 .72627 208.47 297.89)" fx="120.609" fy="745.077"/>
    <radialGradient id="l" cx="120.609" cy="745.077" r="100" xlink:href="#f" gradientUnits="userSpaceOnUse" gradientTransform="matrix(.5447 0 0 .5447 150.832 363.472)" fx="120.609" fy="745.077"/>
    <radialGradient id="k" cx="120.609" cy="745.077" r="100" xlink:href="#g" gradientUnits="userSpaceOnUse" gradientTransform="matrix(.36314 0 0 .36314 114.034 443.61)" fx="120.609" fy="745.077"/>
    <radialGradient id="j" cx="120.609" cy="745.077" r="100" xlink:href="#h" gradientUnits="userSpaceOnUse" gradientTransform="matrix(.18157 0 0 .18157 161.544 546.375)" fx="120.609" fy="745.077"/>
    <radialGradient id="m" cx="120.609" cy="745.077" r="100" xlink:href="#i" gradientUnits="userSpaceOnUse" gradientTransform="matrix(.47208 0 0 .47208 198.37 381.633)" fx="120.609" fy="745.077"/>
  </defs>
  <g transform="translate(0 -652.362)">
    <circle class="bubble" cx="180.791" cy="684.309" r="12.5" fill="url(#j)" style="isolation:auto;mix-blend-mode:normal"/>
    <circle class="bubble" cx="152.528" cy="719.478" r="25" fill="url(#k)" style="isolation:auto;mix-blend-mode:normal"/>
    <circle class="bubble" cx="208.573" cy="777.274" r="37.5" fill="url(#l)" style="isolation:auto;mix-blend-mode:normal"/>
    <circle class="bubble" cx="248.414" cy="740.262" r="32.5" fill="url(#m)" style="isolation:auto;mix-blend-mode:normal"/>
    <circle class="bubble" cx="75" cy="936.35" r="75" fill="url(#n)" style="isolation:auto;mix-blend-mode:normal"/>
    <circle class="bubble" cx="285.459" cy="849.627" r="50" fill="url(#o)" style="isolation:auto;mix-blend-mode:normal"/>
    <circle class="bubble" cx="132.698" cy="859.755" r="62.5" fill="url(#p)" style="isolation:auto;mix-blend-mode:normal"/>
    <circle class="bubble" cx="362.5" cy="939.406" r="87.5" fill="url(#q)" style="isolation:auto;mix-blend-mode:normal"/>
    <g class="bubble">
      <circle cx="204.652" cy="952.362" r="100" fill="url(#r)" style="isolation:auto;mix-blend-mode:normal"/>
      <rect width="13" height="26" x="190" y="903.362" fill="#384960" fill-opacity=".665" style="isolation:auto;mix-blend-mode:normal" ry="6.5"/>
      <rect width="13" height="26" x="233" y="903.362" fill="#384960" fill-opacity=".665" ry="6.5" style="isolation:auto;mix-blend-mode:normal"/>
      <path fill="none" stroke="#384960" stroke-opacity=".667" stroke-width="7.017" d="M199.06 946.703c.418 7.41 9.136 13.74 19.523 13.517 10.23-.227 18.36-6.212 18.36-13.517" style="isolation:auto;mix-blend-mode:normal" stroke-linecap="round" stroke-linejoin="round"/>
    </g>
  </g>
</svg>
              
            
!

CSS

              
                body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.bubbles { height: 75vh; }
.bubble {
  animation: soar 3s ease-in-out infinite;
}
.delay-bubbles();



@keyframes soar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.delay-bubbles(@n: 1, @delay: 1s) when (@n <= 9) {
  .bubble:nth-child(@{n}) {
    animation-delay: @delay - .15s;
  }
  .delay-bubbles(@n + 1, @delay - .15s);
}
              
            
!

JS

              
                
              
            
!
999px

Console