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

Quick-add: + add another resource

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.

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.

            
              <div id="container">
  <div id="body"></div>
  <div id="boar">
    <div class="b1"></div>
    <div class="b2"></div>
    <div class="b3"></div>
    <div class="b4"></div>
    <div class="b5"></div>
    <div class="b6"></div>
  </div>
  <div id="belt"></div>
  <div id="belt-bottom-l"></div>
  <div id="belt-bottom-r"></div>
  <div class="legs ll"></div>
  <div class="legs rl"></div>
  <div class="knees lk"></div>
  <div class="knees rk"></div>
  <div class="feet lf"></div>
  <div class="feet rf"></div>
  <div class="arms la">
    <div class="arm"></div>
    <div class="hand"></div>
  </div>
  <div class="l-sleeve1"></div>
  <div class="l-sleeve2"></div>
  <div class="arms ra">
    <div class="arm"></div>
    <div class="hand"></div>
  </div>
  <div class="r-sleeve1"></div>
  <div class="r-sleeve2"></div>
  <div id="head">
    <div id="bolt1"></div>
    <div id="bolt2"></div>
    <div id="bolt3"></div>
    <div id="helmet"></div> 
    <div id="eye"></div>
    <div class="mouth m1"></div>
    <div class="mouth m2"></div>
    <div class="mouth m3"></div>
    <div class="mouth m4"></div>
    <div class="mouth m5"></div>
    <div class="mouth m6"></div>
    <div class="mouth m7"></div>
    <div class="mouth m8"></div>
    <div id="neck-l1"></div>
    <div id="neck-l2"></div>
    <div id="neck-l3"></div>
    <div id="neck-l4"></div>
  </div>
  <div id="blood"></div>
  <div id="sword"></div>
  <div id="quote">Tis but a scratch.</div>
</div>
            
          
!
            
              
body {
  background-color: #e2e2e2;
  cursor: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/108463/sword.png'), auto;
}

#container {
  display: grid;
  grid-template-columns: repeat(90, 10px);
  grid-template-rows: repeat(70, 10px);
  transform-style: preserve-3d;
}

#head {
  grid-column: 29 / 50;
  grid-row: 5 / 26;
  display: grid;
  grid-template-columns: repeat(21, 10px);
  grid-template-rows: repeat(21, 10px);
  z-index: 1;
 transform-style: preserve-3d;
}

#helmet {
  grid-column: 5 / 18;
  grid-row: 1 / 18;
  background-color: darkgrey;
}

#bolt1 {
  background-color: black;
  grid-column: 7 / 9;
  grid-row: 1;
  z-index: 2;
}

#bolt2 {
  background-color: black;
  grid-column: 11 / 13;
  grid-row: 1;
  z-index: 2;
}

#bolt3 {
  background-color: black;
  grid-column: 15 / 17;
  grid-row: 1;
  z-index: 2;
}

#eye {
  grid-row: 5 / 7;
  grid-column: 6 / 17;
  background-color: black; 
}


.mouth {
  background-color: black;
}

.m1 {
  grid-column: 8;
  grid-row: 11;
}

.m2 {
  grid-column: 10;
  grid-row: 11;
}

.m3 {
  grid-column: 12;
  grid-row: 11;
}

.m4 {
  grid-column: 14;
  grid-row: 11;
}

.m5 {
  grid-column: 8;
  grid-row: 13;
}

.m6 {
  grid-column: 10;
  grid-row: 13;
}

.m7 {
  grid-column: 12;
  grid-row: 13;
}

.m8 {
  grid-column: 14;
  grid-row: 13;
}

#neck-l1 {
  grid-column: 2 / 21;
  grid-row: 18;
  background-color: darkgrey;
}

#neck-l2 {
  grid-column: 1 / 22;
  grid-row: 19;
  background-color: darkgrey;
}

#neck-l3 {
  grid-column: 3 / 20;
  grid-row: 20;
  background-color: darkgrey;
}

#neck-l4 {
  grid-column: 5 / 18;
  grid-row: 21;
  background-color: darkgrey;
}


#body {
  background-color: black;
  grid-column: 32 / 47; 
  grid-row: 25 / 58;
}

#boar {
  background-color: #ea0c33;
  grid-column: 35 / 43;
  grid-row: 28 / 35;
  display: grid;
  grid-template-columns: repeat(8, 10px);
  grid-template-rows: repeat(7, 10px);
}

#boar .b1 {
  grid-row: 1 / 3;
  grid-column: 1 / 6;
  background-color: black;
}

#boar .b2 {
  grid-row: 1 / 4;
  grid-column: 7;
  background-color: black;
}

#boar .b3 {
  grid-row: 3;
  grid-column: 1 / 3;
  background-color: black;
}

#boar .b4 {
  grid-row: 4;
  grid-column: 5 / 7;
  background-color: black;
}

#boar .b5 {
  grid-row: 7;
  grid-column: 1;
  background-color: black;
}

#boar .b6 {
  grid-row: 7;
  grid-column: 3;
  background-color: black;
}

#belt {
  background-color: darkgrey;
  z-index: 2;
  grid-row: 40 / 42;
  grid-column: 32 / 47; 
}

#belt-bottom-l {
   background-color: darkgrey;
  z-index: 2;
  grid-row: 42 / 44;
  grid-column: 32;
}

#belt-bottom-r {
   background-color: darkgrey;
  z-index: 2;
  grid-row: 42 / 44;
  grid-column: 46;
}

.ll {
  grid-column: 34 / 36;
  grid-row: 58 / 69;
  background-color: black;
}

.rl {
  grid-column: 41 / 43;
  background-color: black;
  grid-row: 58 / 69;
}

.lk {
  grid-column: 36 / 37;
  grid-row: 62 / 65;
  background-color: black;
}

.rk {
  grid-column: 43 / 44;
  grid-row: 62 / 65;
  background-color: black;
}

.lf {
  grid-column: 34 / 38;
  grid-row: 68 / 69;
  background-color: black;
}

.rf {
  grid-column: 41 / 45;
  grid-row: 68 / 69;
  background-color: black;
}


.ra {
  grid-row: 25 / 48;
  grid-column: 47 / 50;
  display: grid;  
  grid-template-columns: repeat(3, 10px);
  grid-template-rows: repeat(23, 10px);
  animation-name: cut;
  animation-duration: 0.5s;
  animation-play-state: paused; 
  animation-fill-mode: both;
}

.la {
  grid-row: 25 / 48;
  grid-column: 29 / 32;
  display: grid;  
  grid-template-columns: repeat(3, 10px);
  grid-template-rows: repeat(23, 10px);
}


.arm {
  background-color: black;
}

.r-sleeve1 {
  background-color: black;
  grid-row: 25 / 29;
  grid-column: 47;
      animation-name: blood;
  animation-duration: 0.5s;
  animation-play-state: paused; 
  animation-fill-mode: both;
}

.r-sleeve2 {
  background-color: black;
  grid-row: 26 / 28;
  grid-column: 48;
    animation-name: blood;
  animation-duration: 0.5s;
  animation-play-state: paused; 
  animation-fill-mode: both;
  
}

.ra .arm {
  grid-column: 2 / 4;
  grid-row: 3 / 21;
  animation-name: rotate-r-arm;
  animation-duration: 0.5s;
  animation-play-state: paused; 
  animation-fill-mode: both;
}

.ra .hand {
  background-color: grey;
  grid-row: 21 / 24;
  grid-column: 2 / 4;
  animation-name: rotate-r-hand;
  animation-duration: 0.5s;
  animation-play-state: paused; 
  animation-fill-mode: both;
}


.l-sleeve1 {
  background-color: black;
  grid-row: 25 / 29;
  grid-column: 31;
}

.l-sleeve2 {
  background-color: black;
  grid-row: 26 / 28;
  grid-column: 30;
}

.la .arm {
  grid-column: 1 / 3;
  grid-row: 3 / 21;
}

.la .hand {
   background-color: grey;
  grid-row: 21 / 24;
  grid-column: 1 / 3;

}

#quote {
  grid-column: 60 / 90;
  grid-row: 10 / 20;
  font-size: 2em;
  font-family: monospace;
  animation-name: quote;
  animation-duration: 0.5s;
  animation-play-state: paused; 
  animation-fill-mode: both;

}

#blood {
   grid-row: 64 / 66;
  grid-column: 54 / 56;
  background-color: #e2e2e2;
    animation-name: show-blood;
  animation-duration: 0.5s;
  animation-play-state: paused; 
  animation-fill-mode: both;
}




#sword {
  grid-row: 48 / 68;
  grid-column: 29 / 31;
  background-color: darkgrey;
}

#sword:before {
  content:"";
  position: absolute;
  background-color: darkgrey;
  width: 60px;
  height: 10px;
  margin-left: -20px;
  z-index: 1;
}

#sword:after {
  content:"";
  position: absolute;
  width: 60px;
  height: 10px;
  bottom: 0;
  margin-bottom: 19px;
margin-left: -1px;
  z-index: 1;
    width: 0; 
  height: 0; 
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 11px solid darkgrey;
}


/*Animations*/




.ra:hover {
  animation: cut 0.5s linear;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

.ra:hover > .arm {
  animation: rotate-r-arm 0.5s linear;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

.ra:hover > .hand {
   animation: rotate-r-hand 0.5s linear;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

.ra:hover ~ #quote {
   animation: quote 0.5s linear;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

.ra:hover ~ .r-sleeve2 {
  animation: blood 0.5s linear;
  animation-fill-mode: forwards;
  animation-play-state: running;
}


.ra:hover ~ .r-sleeve1 {
  animation: blood 0.5s linear;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

.ra:hover ~ #blood {
    animation: show-blood 0.5s linear;
  animation-fill-mode: forwards;
  animation-play-state: running;
}

@keyframes cut {
 from {
    grid-row: 25 / 48;
    grid-column: 47 / 50;
    display: grid;  
    grid-template-columns: repeat(3, 10px);
    grid-template-rows: repeat(23, 10px);
  
  }
  to {
    grid-row: 63 / 66;
    grid-column: 53 / 76;
    grid-template-rows: repeat(3, 10px);
    grid-template-columns: repeat(23, 10px);
  }

}


@keyframes rotate-r-arm {
  
  from {  
  grid-column: 2 / 4;
  grid-row: 3 / 21;
  }
  
  to {
  grid-row: 2 / 4;
  grid-column: 3 / 21;
  }
   
}

@keyframes rotate-r-hand {
  from {
  grid-row: 21 / 24;
  grid-column: 2 / 4;
}
  
  to {
  grid-column: 21 / 24;
  grid-row: 2 / 4;
  }
}

@keyframes quote {
  
  from {
     color: #e2e2e2;
  }
  to {
    color: black;
  }
  
}



@keyframes blood {
  from {
    background-color: black;
  }
  to {
    background-color: red;
  }
}

@keyframes show-blood {
  
  from {
     background-color: #e2e2e2;
  }
  to {
    background-color: red;
  }
  
}
            
          
!
            
              // Cursor Sword by Javier Calvo Patiño from the Noun Project
            
          
!
999px
Loading ..................

Console