cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              #windmill
 .post
 .engine
 .flaps
  .flap
  .flap
  .flap
 .bulb
 .head
            
          
!
            
              $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%)
            
          
!
            
              // twitter @msvaljek
// https://msvaljek.blogspot.com/2013/08/css-windmill.html
            
          
!
999px
Loading ..................

Console