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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class="reference-scroll"></div>

<div class="bb8">
  <div class="head"></div>
  <div class="body"></div>
</div>
              
            
!

CSS

              
                body,
html {
  height: 100%;
  background-color: #9ACBD2;
}

body::before {
  content: '';
  background-color: #F1D6A9;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45%;
}

.reference-scroll {
  position: relative;
  width: 8vmin;
  height: 200vh;
  background: linear-gradient(to bottom, #F67D04 0%,#F67D04 50%,#ECE6CE 50%,#ECE6CE 100%);
  background-size: 100% 50px;
}

.bb8 {
  position: fixed;
  top: 50%;
  left: 50%;
  height: 360px;
  width: 250px;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.bb8 .head {
  border-radius: 75px 75px 20px 20px;
  width: 150px;
  height: 110px;
  background-color: #ece6ce;
  margin: 0 auto -5px auto;
  position: relative;
  box-shadow: 0 15px 5px -5px rgba(0, 0, 0, 0.25);
  background-image: radial-gradient(circle at 120px 60px, #b3b29e, #b3b29e 2%, transparent 3%), radial-gradient(circle at 82px 38px, #b3b29e, #b3b29e 4%, transparent 5%), radial-gradient(circle at 75px 75px, #b3b29e, #b3b29e 5%, transparent 6%), radial-gradient(circle at 115px 65px, #000, #000 8%, #ece6ce 9%, #ece6ce 11%, #000 12%, #000 12.5%, transparent 13%), radial-gradient(circle at 75px 45px, #000, #000 18%, #ece6ce 19%, #ece6ce 23%, transparent 24%), linear-gradient(0deg, #b3b29e, #b3b29e 10%, transparent 11%, transparent 14%, #2386af 15%, #2386af 21%, transparent 22%, transparent 70%, #ff7e00 71%, #ff7e00 76%, transparent 77%, transparent 86%, #2386af 87%, #2386af 93%, transparent 94%), linear-gradient(90deg, transparent, transparent 12%, #ece6ce 13%, #ece6ce 15%, transparent 16%, transparent 19%, #ece6ce 20%, #ece6ce 90%, transparent 91%), linear-gradient(0deg, transparent, transparent 27%, #ff7e00 29%, #ff7e00 38%, transparent 39%);
  transform-origin: 50% 200px;
  z-index: 1;
}

.bb8 .body {
  border-radius: 50%;
  background-color: #ece6ce;
  width: 250px;
  height: 250px;
  margin: 0 auto;
  position: relative;
  background-image: radial-gradient(circle at 188px 187px, #8b8879, #8b8879 2%, transparent 3%), radial-gradient(circle at 195px 60px, #8b8879, #8b8879 3%, transparent 4%), radial-gradient(circle at 155px 90px, #8b8879, #8b8879 3%, transparent 4%), radial-gradient(circle at 70px 210px, #8b8879, #8b8879 3%, transparent 4%), radial-gradient(circle at 180px 180px, transparent 21%, #ff7e00 22%, #ff7e00 27%, transparent 28%, transparent 100%), radial-gradient(circle at 45px 45px, transparent 21%, #ff7e00 22%, #ff7e00 27%, transparent 28%, transparent 100%), linear-gradient(48deg, transparent, transparent 69%, #958979 70%, transparent 71%), linear-gradient(145deg, transparent, transparent 54%, #958979 55%, transparent 56%), linear-gradient(135deg, #ece6ce, #ece6ce 25%, transparent 26%, transparent 40%, #ece6ce 41%, #ece6ce 53%, transparent 54%, transparent 64%, #ece6ce 65%, #ece6ce 78%, transparent 79%), linear-gradient(45deg, transparent, transparent 47%, #ff7e00 48%, #ff7e00 52%, transparent 53%);
}
              
            
!

JS

              
                /* 
Consignes: https://smnarnold.com/exercices/gsap/gsap-scrub-bb-8
*/

              
            
!
999px

Console