123

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.

            
              <div class="bb-8">
  		<div class="bb-8__head">
    		<div class="bb-8__head__antenna"></div>
    		<div class="bb-8__head__antenna--longer"></div>
    		<div class="bb-8__head__top">
      			<div class="bb-8__head__top__bar--gray"></div>
     			<div class="bb-8__head__top__bar--red"></div>
			    <div class="bb-8__head__top__lens">
			    	<div class="bb-8__head__top__lens__inner"></div>
			    </div>
			    <div class="bb-8__head__top__lens--secondary">
			    	<div class="bb-8__head__top__lens--secondary__inner"></div>
			    </div>
			    <div class="bb-8__head__top__bar--red--lower--left"></div>
			    <div class="bb-8__head__top__bar--red--lower--right"></div>
			    <div class="bb-8__head__top__bar--gray--lower"></div>
    		</div>
    		<div class="bb-8__head__joint"></div>
  		</div>
		<div class="bb-8__head-shadow"></div>
		<div class="bb-8__body">
		    <div class="bb-8__body__circle bb-8__body__circle--one">
		    	<div class="bb-8__body__circle__bar bb-8__body__circle--one__bar--one"></div>
		    	<div class="bb-8__body__circle__bar bb-8__body__circle--one__bar--two"></div>
		    	<div class="bb-8__body__circle--one__inner-circle"></div>
		    	<div class="bb-8__body__circle--one__inner-border"></div>
		    </div>
		    <div class="bb-8__body__circle bb-8__body__circle--two">
		    	<div class="bb-8__body__circle__bar bb-8__body__circle--two__bar--one"></div>
		    	<div class="bb-8__body__circle--two__inner-border"></div>
		    </div>
		    <div class="bb-8__body__circle bb-8__body__circle--three">
		    	<div class="bb-8__body__circle__bar bb-8__body__circle--three__bar--one"></div>
		    	<div class="bb-8__body__circle__bar bb-8__body__circle--three__bar--two"></div>
		    	<div class="bb-8__body__circle--three__inner-circle"></div>
		    	<div class="bb-8__body__circle--three__inner-border"></div>
		    </div>
		    <div class="bb-8__body__line bb-8__body__line--one"></div>
		    <div class="bb-8__body__line bb-8__body__line--two"></div>
		    <div class="bb-8__body__line bb-8__body__line--three"></div>
		    <div class="bb-8__body__screw bb-8__body__screw--one"></div>
		    <div class="bb-8__body__screw bb-8__body__screw--two"></div>
		    <div class="bb-8__body__screw bb-8__body__screw--three"></div>
		    <div class="bb-8__body__screw bb-8__body__screw--four"></div>
		    <div class="bb-8__body__screw bb-8__body__screw--five"></div>
		    <div class="bb-8__body__screw bb-8__body__screw--six"></div>
    	</div>
  		<div class="bb-8__body-shadow"></div>
	</div>
<div class="github-link">
  <a target="_blank" href="https://github.com/jrmontejo/bb-8">github</a>
</div>
            
          
!
            
              @-webkit-keyframes rotate-body {
  from {
    -webkit-transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(-360deg);
  }
}

@-ms-keyframes rotate-body {
  from {
    -ms-transform: rotate(0deg);
  }
  to {
    -ms-transform: rotate(-360deg);
  }
}

@keyframes rotate-body {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

@-webkit-keyframes head-tilt {
  from {
    -webkit-transform: rotate(0deg);
  }
  25% {
    -webkit-transform: rotate(-0.8deg);
  }
  50% {
    -webkit-transform: rotate(0deg);
  }
  75% {
    -webkit-transform: rotate(0.8deg);
  }
  to {
    -webkit-transform: rotate(0deg);
  }
}

@-ms-keyframes head-tilt {
  from {
    -ms-transform: rotate(0deg);
  }
  25% {
    -ms-transform: rotate(-0.8deg);
  }
  50% {
    -ms-transform: rotate(0deg);
  }
  75% {
    -ms-transform: rotate(0.8deg);
  }
  to {
    -ms-transform: rotate(0deg);
  }
}

@keyframes head-tilt {
  from {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-0.8deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(0.8deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@-webkit-keyframes move-shadow {
  from {
    -webkit-transform: scaleX(0.97);
  }
  to {
    -webkit-transform: scaleX(1);
  }
}

@-ms-keyframes move-shadow {
  from {
    -ms-transform: scaleX(0.97);
  }
  to {
    -ms-transform: scaleX(1);
  }
}

@keyframes move-shadow {
  from {
    transform: scaleX(0.97);
  }
  to {
    transform: scaleX(1);
  }
}

body {
  background-color: #7C9A9C;
}

.bb-8 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 326px;
  margin-bottom: 50px;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.bb-8__head {
  z-index: 4;
  position: absolute;
  width: 140px;
  height: 93px;
  -webkit-animation: head-tilt 0.3s 0.5s linear infinite;
  -ms-animation: head-tilt 0.3s 0.5s linear infinite;
  animation: head-tilt 0.3s 0.5s linear infinite;
}

.bb-8__head__antenna {
  width: 4px;
  height: 20px;
  background-color: #D3D3D3;
  position: absolute;
  top: -18px;
  left: 120px;
  border-radius: 3px;
}

.bb-8__head__antenna--longer {
  width: 4px;
  height: 30px;
  background-color: #D3D3D3;
  position: absolute;
  top: -25px;
  left: 130px;
  border-radius: 3px;
}

.bb-8__head__antenna--longer:before {
  content: "";
  width: 100%;
  height: 40%;
  background-color: #BEBAB5;
  position: absolute;
  bottom: 0;
}

.bb-8__head__top {
  overflow: hidden;
  position: absolute;
  width: 140px;
  height: 85px;
  background-color: #FFF3E7;
  border-radius: 200px 200px 0 0;
  position: absolute;
  left: 50px;
}

.bb-8__head__top__bar--gray {
  width: 100%;
  height: 10px;
  background-color: #D3D3D3;
  position: absolute;
  top: 10px;
}

.bb-8__head__top__bar--red {
  width: 100%;
  height: 6px;
  background-color: #FF9649;
  position: absolute;
  top: 30px;
}

.bb-8__head__top__bar--red--lower--left {
  width: 18%;
  height: 10px;
  background-color: #FF9649;
  position: absolute;
  left: 0;
  bottom: 15px;
}

.bb-8__head__top__bar--red--lower--right {
  width: 28%;
  height: 10px;
  background-color: #FF9649;
  position: absolute;
  right: 0;
  bottom: 15px;
}

.bb-8__head__top__bar--red--lower--right:before {
  content: "";
  background-color: #FFF3E7;
  width: 6px;
  height: 12px;
  position: absolute;
  left: 10px;
  top: -1px;
}

.bb-8__head__top__bar--gray--lower {
  background-color: #D3D3D3;
  width: 100%;
  height: 10px;
  position: absolute;
  bottom: 0px;
}

.bb-8__head__top__lens {
  width: 35px;
  height: 35px;
  background-color: #555555;
  border: 3px solid #FFF3E7;
  border-radius: 50%;
  position: absolute;
  top: 22px;
  left: 32px;
}

.bb-8__head__top__lens:before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: #C7C5C6;
  border-radius: 50%;
  position: absolute;
  right: 5px;
  top: 7px;
  z-index: 1;
}

.bb-8__head__top__lens__inner {
  width: 25px;
  height: 25px;
  background-color: #414141;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
}

.bb-8__head__top__lens--secondary {
  width: 12px;
  height: 12px;
  border: 2px solid #414141;
  border-radius: 50%;
  position: absolute;
  right: 50px;
  bottom: 18px;
}

.bb-8__head__top__lens--secondary__inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #414141;
  position: absolute;
  top: 2px;
  left: 2px;
}

.bb-8__head__joint {
  width: 138px;
  height: 8px;
  position: absolute;
  top: 85px;
  left: 51px;
  background-color: #BEBAB5;
  z-index: 4;
}

.bb-8__head__joint:before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 0 8px;
  border-color: transparent transparent transparent #7C9A9C;
  position: absolute;
  top: 1px;
  left: 0;
}

.bb-8__head__joint:after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 8px 8px;
  border-color: transparent transparent #7C9A9C transparent;
  position: absolute;
  top: 1px;
  right: 0;
}

.bb-8__body,
.bb-8__head-shadow {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  position: absolute;
  top: 85px;
}

.bb-8__body {
  background-color: #FFF3E7;
  z-index: 2;
  -webkit-animation: rotate-body 0.9s 0.5s linear infinite;
  -ms-animation: rotate-body 0.9s 0.5s linear infinite;
  animation: rotate-body 0.9s 0.5s linear infinite;
}

.bb-8__head-shadow {
  background-color: transparent;
  z-index: 3;
  -webkit-animation: head-tilt 0.3s 0.5s linear infinite;
  -ms-animation: head-tilt 0.3s 0.5s linear infinite;
  animation: head-tilt 0.3s 0.5s linear infinite;
}

.bb-8__head-shadow:before {
  content: "";
  width: 100%;
  height: 30px;
  background-color: transparent;
  background-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  top: -8px;
}

.bb-8__body__circle {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  border: 20px solid #FF9649;
  position: absolute;
  z-index: 1;
}

.bb-8__body__circle__bar {
  width: 35px;
  height: 20px;
  background-color: #FF9649;
  position: absolute;
  top: 50px;
  left: 80px;
}

.bb-8__body__circle--one {
  top: -20px;
  left: -40px;
}

.bb-8__body__circle--one__bar--one {
  -webkit-transform: rotate(29deg);
  -ms-transform: rotate(29deg);
  transform: rotate(29deg);
  top: 72px;
}

.bb-8__body__circle--one__bar--two {
  -webkit-transform: rotate(110deg);
  -ms-transform: rotate(110deg);
  transform: rotate(110deg);
  left: 5px;
  top: 100px;
}

.bb-8__body__circle--one__inner-circle {
  width: 70px;
  height: 70px;
  background-color: #D3D3D3;
  position: absolute;
  top: 20px;
  left: 10px;
  border-radius: 50%;
}

.bb-8__body__circle--one__inner-circle:before {
  content: "";
  width: 80px;
  height: 12px;
  border-top: 3px solid #FFF3E7;
  border-bottom: 3px solid #FFF3E7;
  position: absolute;
  top: 10px;
  -webkit-transform: rotate(30deg);
  -ms-transform: rotate(30deg);
  transform: rotate(30deg);
}

.bb-8__body__circle--one__inner-circle:after {
  content: "";
  width: 65px;
  height: 12px;
  border-top: 3px solid #FFF3E7;
  border-bottom: 3px solid #FFF3E7;
  position: absolute;
  bottom: 10px;
  -webkit-transform: rotate(30deg);
  -ms-transform: rotate(30deg);
  transform: rotate(30deg);
}

.bb-8__body__circle--one__inner-border {
  width: 70px;
  height: 70px;
  border: 10px solid #D3D3D3;
  border-color: #D3D3D3 transparent transparent transparent;
  position: absolute;
  top: 0px;
  left: 10px;
  border-radius: 50%;
  -webkit-transform: rotate(40deg);
  -ms-transform: rotate(40deg);
  transform: rotate(40deg);
}

.bb-8__body__circle--two {
  top: -20px;
  right: -80px;
}

.bb-8__body__circle--two__bar--one {
  -webkit-transform: rotate(-30deg);
  -ms-transform: rotate(-30deg);
  transform: rotate(-30deg);
  top: 75px;
  left: -7px;
}

.bb-8__body__circle--two__inner-border {
  width: 70px;
  height: 70px;
  border: 15px solid #D3D3D3;
  border-color: transparent transparent transparent #D3D3D3;
  position: absolute;
  top: 8px;
  left: 5px;
  border-radius: 50%;
  -webkit-transform: rotate(35deg);
  -ms-transform: rotate(35deg);
  transform: rotate(35deg);
}

.bb-8__body__circle--three {
  bottom: -70px;
  right: 20px;
}

.bb-8__body__circle--three__bar--one {
  -webkit-transform: rotate(91deg);
  -ms-transform: rotate(91deg);
  transform: rotate(91deg);
  top: 5px;
  left: 40px;
}

.bb-8__body__circle--three__bar--two {
  -webkit-transform: rotate(15deg);
  -ms-transform: rotate(15deg);
  transform: rotate(15deg);
  left: -15px;
}

.bb-8__body__circle--three__inner-circle {
  width: 70px;
  height: 70px;
  background-color: #D3D3D3;
  position: absolute;
  top: 38px;
  left: 25px;
  border-radius: 50%;
}

.bb-8__body__circle--three__inner-border {
  width: 70px;
  height: 70px;
  border: 25px solid #D3D3D3;
  border-color: #D3D3D3 transparent transparent transparent;
  position: absolute;
  top: 15px;
  left: 0px;
  border-radius: 50%;
  -webkit-transform: rotate(65deg);
  -ms-transform: rotate(65deg);
  transform: rotate(65deg);
}

.bb-8__body__line {
  height: 6px;
  position: absolute;
  background-color: #9E9EAB;
  border-radius: 90px;
}

.bb-8__body__line--one {
  width: 80px;
  top: 46px;
  right: 60px;
  -webkit-transform: rotate(1deg);
  -ms-transform: rotate(1deg);
  transform: rotate(1deg);
}

.bb-8__body__line--two {
  width: 70px;
  bottom: 90px;
  right: 5px;
  -webkit-transform: rotate(-60deg);
  -ms-transform: rotate(-60deg);
  transform: rotate(-60deg);
}

.bb-8__body__line--three {
  width: 70px;
  bottom: 85px;
  left: 45px;
  -webkit-transform: rotate(60deg);
  -ms-transform: rotate(60deg);
  transform: rotate(60deg);
}

.bb-8__body__screw {
  border-radius: 50%;
  width: 10px;
  height: 10px;
  background-color: #9E9EAB;
  position: absolute;
}

.bb-8__body__screw--one {
  top: 20px;
  left: 131px;
}

.bb-8__body__screw--two {
  top: 72px;
  left: 135px;
}

.bb-8__body__screw--three {
  bottom: 70px;
  right: 18px;
}

.bb-8__body__screw--four {
  bottom: 96px;
  right: 60px;
}

.bb-8__body__screw--five {
  bottom: 70px;
  left: 54px;
}

.bb-8__body__screw--six {
  bottom: 96px;
  left: 96px;
}

.bb-8__body__screw--one:before,
.bb-8__body__screw--two:before,
.bb-8__body__screw--three:before,
.bb-8__body__screw--four:before,
.bb-8__body__screw--five:before,
.bb-8__body__screw--six:before {
  content: "";
  width: 4px;
  height: 4px;
  border: 1px solid #D3D3D3;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
}

.bb-8__body-shadow {
  width: 180px;
  height: 25px;
  background-color: transparent;
  background-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  bottom: -15px;
  left: 30px;
  z-index: -1;
  border-radius: 50%;
  -webkit-animation: move-shadow 0.3s 0.5s linear infinite;
  -ms-animation: move-shadow 0.3s 0.5s linear infinite;
  animation: move-shadow 0.3s 0.5s linear infinite;
}

.github-link {
  position: absolute;
  bottom: 0;
  padding: 15px;
}

.github-link a {
  font-size: 20px;
  text-decoration: none;
  letter-spacing: 2px;
  color: #FFF3E7;
}
            
          
!
            
              /*
BB-8 in Pure CSS
https://github.com/jrlmontejo/bb-8

Art by Brent Clouse https://dribbble.com/shots/2178528-BB-8
*/
            
          
!
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.

Console