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. 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

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 id="sheep-wrap">
  <div id="ground">
    <div class="sun"></div>
    <div class="grass"></div>
    <div class="grass"></div>
    <div class="grass"></div>
    
    <div class="board">
      <div class="part-head">
        <div class="part-eye">
          <div class="part-blackeye">
          </div>
          <div class="part-whiteeye">
          </div>
          <div class="part-eyelid">
          </div>
          <div class="part-eyelid-u">
          </div>
        </div>
        <div class="part-mouse">
        </div>
      </div>
      <div class="part-nose">
        <div class="part-nosehead">
        </div>
      </div>
      <div class="part-ear">
      </div>
      <div class="part-body">
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="wool"></div>
        <div class="foot">
          <div class="part-foot"></div>
          <div class="part-foot"></div>
          <div class="part-foot"></div>
          <div class="part-foot"></div>
        </div>
        <div class="tale"></div>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @mixin center-fix()
  position: absolute
  top: 50%
  left: 50%
  transform: translate(-50%,-50%)
  
@mixin wool($top,$left,$z-index,$size)
  position: absolute
  top: $top
  left: $left
  background: #FFF
  width: $size
  height: $size
  border-radius: 100%
  border: 0px solid #000
  z-index: $z-index
  
@mixin foot($left,$background,$z-index,$height)
  position: absolute
  top: 80%
  left: $left
  width: 10%
  height: $height
  background: $background
  z-index: $z-index
  border: 2px solid #000
  border-radius: 80% 100% 80% 100% /80% 80% 80% 80%

@mixin keyframes ($animation-name)
  @-webkit-keyframes #{$animation-name}
    @content
  @-moz-keyframes #{$animation-name}
    @content
  @keyframes #{$animation-name}
    @content
  
@mixin animation($animation-name)
  -webkit-animation: $animation-name
  -moz-animation: $animation-name
  animation: $animation-name
  -webkit-animation-fill-mode: both
  -moz-animation-fill-mode: both
  animation-fill-mode: both

body
  margin: 0
  box-sizing: border-box
  
#sheep-wrap
  position: relative
  margin: 0
  width: 100%
  height: 600px
  background: skyblue
  overflow: hidden

.board
  position: relative
  top: -100%
  width: 500px
  height: 500px
  margin: 0 auto
  
  .part-head
    position: absolute
    top: 20%
    left: 10%
    width: 25%
    height: 26%
    border-radius: 100%
    border: 2px solid #000
    background: #FFF
    z-index: 10
    &:after
      content: ""
      position: absolute
      top: 26.2%
      left: -5%
      width: 30%
      height: 53%
      background: #FFF
      border-radius: 100%
    
    .part-eye
      position: absolute
      top: 14%
      left: 28%
      width: 30%
      height: 30%
      border: 3px solid #000
      border-radius: 100%
      background: linear-gradient(#1a4884 0%, #2989d8 50%, #207cca 51%, #FFF 100%)
        
      
      .part-eyelid
        position: absolute
        top: -15%
        left: -8%
        width: 105%
        height: 50%
        border: 2px solid #000
        border-radius: 50px 50px 0 0
        background: #FFF
        
      .part-eyelid-u
        position: absolute
        display: none
        top: 45%
        left: -8%
        width: 110%
        height: 20%
        border-top: 3px solid #000
        border-radius: 100% 100% 0 0
        transform: rotate(0deg)
        
      .part-blackeye
        width: 50%
        height: 50%
        border: 1px solid #000
        border-radius: 100%
        background: #000
        @include center-fix
          
      .part-whiteeye
        position: absolute
        top: 50%
        left: 70%
        transform: translate(-50%,-50%)
        width: 20%
        height: 20%
        border: 1px solid #000
        border-radius: 100%
        background: #FFF
        
    .part-mouse
      position: absolute
      top: 65%
      left: 8%
      width: 40%
      height: 15%
      border-left: 2px solid #000
      border-top: 4px solid #000
      border-radius: 50% 100% 50% 100% /80% 80% 10% 40%
      background: none
      transform: rotate(160deg)
      z-index: 0
        
  .part-nose
    position: absolute
    top: 26%
    left: 4%
    width: 20%
    height: 15%
    border: 2px solid #000
    border-radius: 50% 100% 50% 100% /80% 80% 10% 80%
    background: #FFF
    transform: rotate(0deg)
    z-index: 0
    
    .part-nosehead
      position: absolute
      top: 5px
      left: -3px
      width: 20%
      height: 20%
      border: 1px solid #000
      border-radius: 50% 100% 50% 100% /80% 80% 80% 80%
      background: #000
      transform: rotate(95deg)
      z-index: 0
      
  .part-ear
    position: absolute
    top: 20%
    left: 30%
    width: 6%
    height: 4%
    border: 3px solid #000
    border-radius: 50% 100% 50% 100% /80% 80% 10% 80%
    background: #FFF
    transform: rotate(150deg)
    z-index: 10
    
  .part-body
    position: absolute
    top: 10%
    left: 30%
    width: 50%
    height: 50%
    
    .wool:nth-child(1)
      @include wool(50%,50%,10,40%)
      @include animation(wool-anim 4s ease 0s infinite)
    .wool:nth-child(2)
      @include wool(20%,20%,8,40%)
      @include animation(wool-anim 4s ease 0.2s infinite)
    .wool:nth-child(3)
      @include wool(0%,10%,8,40%)
      @include animation(wool-anim 4s ease 0.4s infinite)
    .wool:nth-child(4)
      @include wool(30%,60%,8,40%)
      @include animation(wool-anim 4s ease 0.6s infinite)
    .wool:nth-child(5)
      @include wool(50%,20%,12,40%)
      @include animation(wool-anim 4s ease 0.8s infinite)
    .wool:nth-child(6)
      @include wool(10%,52%,8,40%)
      @include animation(wool-anim 4s ease 1s infinite)
    .wool:nth-child(7)
      @include wool(30%,-5%,8,40%)
      @include animation(wool-anim 4s ease 0.1s infinite)
    .wool:nth-child(8)
      @include wool(50%,0%,10,40%)
      @include animation(wool-anim 4s ease 0.3s infinite)
    .wool:nth-child(9)
      @include wool(40%,40%,8,40%)
      @include animation(wool-anim 4s ease 0.5s infinite)
    .wool:nth-child(10)
      @include wool(5%,40%,8,40%)
      @include animation(wool-anim 4s ease 0.7s infinite)
    .wool:nth-child(11)
      @include wool(5%,-10%,8,40%)
      @include animation(wool-anim 4s ease 0.9s infinite)
    .wool:nth-child(12)
      @include wool(60%,-20%,12,30%)
    .wool:nth-child(13)
      @include wool(3%,-20%,8,40%)
      @include animation(wool-anim 4s ease 0s infinite)
    .wool:nth-child(14)
      @include wool(30%,0%,8,40%)
      @include animation(wool-anim 4s ease 1s infinite)
    .wool:nth-child(15)
      @include wool(10%,25%,8,40%)
      @include animation(wool-anim 4s ease 0.5s infinite)
    .wool:nth-child(16)
      @include wool(7%,-35%,12,20%)
    .wool:nth-child(17)
      @include wool(0%,-25%,12,30%)
        
    .part-foot:nth-child(1)
      @include foot(2%,#FFF,8,20%)
      transform-origin: center top
      @include animation(foot-anim 2.8s linear 0.15s infinite)
    .part-foot:nth-child(2)
      @include foot(6%,#eee,4,18%)
      transform-origin: center top
      @include animation(foot-anim2 2.8s linear 0.15s infinite)
    .part-foot:nth-child(3)
      @include foot(58%,#FFF,8,20%)
      transform-origin: center top
      @include animation(foot-anim 2.8s linear 0.15s infinite)
    .part-foot:nth-child(4)
      @include foot(62%,#eee,4,18%)
      transform-origin: center top
      @include animation(foot-anim2 2.8s linear 0.15s infinite)
        
    .tale
      position: absolute
      width: 28%
      height: 14%
      top: 45%
      left: 85%
      border-radius: 100% 
      border: 2px solid #000
      background: #FFF
      z-index: 8
      transform-origin: left bottom
      @include animation(tale-anim 1.8s ease 0.15s infinite)

#ground
  position: absolute
  top: 55%
  width: 100%
  height: 45%
  background: lightgreen
  margin: 10vh auto 0
  z-index: 18
  
  .sun
    position: absolute
    top: -160%
    right: 10%
    width: 10%
    padding-bottom: 10%
    background: red
    border-radius: 100%
  
  .grass
    position: absolute
    top: -20%
    left: 0
    width: 2%
    height: 20%
    background: green
    z-index: 8
    @include animation(grass-anim 24s linear 0s infinite)
      
  .grass:nth-child(2)
    position: absolute
    top: 25%
    left: 0
    width: 4%
    height: 40%
    background: green
    z-index: 8
    @include animation(grass-anim 12s linear 2s infinite)
      
  .grass:nth-child(3)
    position: absolute
    top: 10%
    left: 0
    width: 2.5%
    height: 25%
    background: green
    z-index: 8
    @include animation(grass-anim 18s linear 6s infinite)
      

@include keyframes(foot-anim)
  0%
    transform: rotate(35deg)
  50%
    transform: rotate(-35deg)
  100%
    transform: rotate(35deg)
  
@include keyframes(foot-anim2)
  0%
    transform: rotate(-35deg)
  50%
    transform: rotate(35deg)
  100%
    transform: rotate(-35deg)
  
@include keyframes(tale-anim)
  0%
    transform: rotate(-45deg)
  50%
    transform: rotate(-25deg)
  100%
    transform: rotate(-45deg)
  
@include keyframes(wool-anim)
  0%
    width: 40%
    height: 40%
  50%
    width: 45%
    height: 45%
  100%
    width: 40%
    height: 40%
  
@include keyframes(grass-anim)
  0%
    left: -20%
  100%
    left: 120%

              
            
!

JS

              
                //WIIIIIIIPPPPPP
              
            
!
999px

Console