css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <svg viewBox="0 0 160 160" width="160" height="160">
  <defs>
        <clipPath id="svgPath">
            <path d="M122.4,55.5C108.9,32.1,78.9,24,55.5,37.6S24,81.1,37.6,104.5L122.4,55.5L160,
                     0v160H0V0h160L122.4,55.5z"  />
        </clipPath>
    <linearGradient id="dope" x1="0%" y1="0%" x2="100%" y2="0%">
      <stop offset="0%"   stop-color="blue"/>
      <stop offset="100%" stop-color="pink"/>
    </linearGradient>
  </defs>
  <circle cx="80" cy="80" r="49" fill="url(#dope)"/>
  <g id="fuckthisshit"  >
  <g id="inner" transform=" matrix(0.866, -0.5, 0.25, 0.433, 80, 80)"  >
    <path id="" d="M 0,70 A 65,70 0 0,0 65,0 5,5 0 0,1 75,0 75,70 0 0,1 0,70Z" fill="#FFF"  >
      <animateTransform attributeName="transform" type="rotate" from="360 0 0" to="0 0 0" dur="1s" repeatCount="indefinite" />
    </path>
    </g>
  </g>  
</svg>
            
          
!
            
              * {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  background: lightblue;
}

svg {
  position: fixed;
  top: 20%;
  height: 60%;
  left: 20%;
  width: 60%;
}
#fuckthisshit{
clip-path: url(#svgPath);
  position: absolute;}
            
          
!
            
              /* Upgraded version of Gabriel's "Orbit" SVG Animation

Original: https://codepen.io/guerreiro/pen/obhzc
Gabriel's Codepen profile: https://codepen.io/guerreiro/

About this version's upgrade:
The original made clever use of the transform: matrix() function by making the 'whisp' appear to be on a 3D plane, orbiting around a percieved sphere/circle. 

It made use of a top layer semi-circle <path> to obscure part of the rotation giving us the clever effect that the 'whisp' is passing behind the sphere/circle. This unfortunatly restricted styling to block colour use for the main base circle.

I've reversed the semi-circle masking overlay <path> to a <clipPath> opposite. It now clips the animated 'whisp' and hides it when it passes through the clipPath hole that was made using a zero width tunnel technique documented here: https://css-tricks.com/cutting-inner-part-element-using-clip-path/

A better explantion can be seen on my website at: https://wraxton.com/projects/orbit.html

 

*/
            
          
!
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