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

              
                #windmill
 .post
 .engine
 .flaps
  .flap
  .flap
  .flap
 .bulb
 .head
              
            
!

CSS

              
                $bgcolor: #222
$windmillcolor: #BABABA
$windmillrotation: 4s
$bulbcolor: #360A0A
$bulbLight: 10px
$lightbulbpulse: 2s

body
  background: $bgcolor

#windmill
  width: 300px
  height: 350px
  margin: 10px auto 0
  position: relative
  z-index: -10
  background: $bgcolor

.post
  position: absolute
  width: 10px
  height: 200px
  background: linear-gradient(to top, $windmillcolor 0%, darken($windmillcolor, 20%) 100%)
  top: 145px
  left: 145px
  border-radius: 3px

.engine
  position: absolute
  width: 20px
  height: 20px
  background: linear-gradient(to bottom, $windmillcolor 0%, darken($windmillcolor, 20%) 100%)
  top: 130px
  left: 140px

.head
  width: 10px
  height: 10px
  position: absolute
  top: 135px
  left: 145px
  z-index: 1000
  background: radial-gradient(center, $windmillcolor 0%, darken($windmillcolor, 40%) 100%)
  border-radius: 50%

.flaps
  width: 200px
  height: 200px
  position: absolute
  top: 40px
  left: 50px
  animation: rotatemill $windmillrotation linear infinite

.flap
  width: 5px
  height: 120px
  position: absolute
  background: linear-gradient(to bottom, $windmillcolor 0%, darken($windmillcolor, 20%) 100%)
  border-top-left-radius: 5px 20px

.flaps .flap:nth-child(1)
  top: -20px
  left: 97px

.flaps .flap:nth-child(2)
  top: 70px
  left: 150px
  transform: rotate(120deg)

.flaps .flap:nth-child(3)
  top: 70px
  left: 45px
  transform: rotate(240deg)

.bulb
  height: 10px
  width: 10px
  position: absolute
  top: 123px
  left: 145px
  background: $bulbcolor
  border-radius: 50%
  animation: lightbulblight $lightbulbpulse linear infinite
  z-index: -1

@keyframes "rotatemill"
  0%
    transform: rotate(0deg)

  100%
    transform: rotate(-360deg)

@keyframes "lightbulblight"
  0%
    background: $bulbcolor
    box-shadow: 0 0 0 $bulbcolor

  50%
    background: lighten($bulbcolor, 60%)
    box-shadow: 0 0 $bulbLight lighten($bulbcolor, 60%)
              
            
!

JS

              
                // twitter @msvaljek
// https://msvaljek.blogspot.com/2013/08/css-windmill.html
              
            
!
999px

Console