CSS keyframes to animate div height from bottom to top -


i have following code animates grey bar top bottom, other way around bottom top: http://jsfiddle.net/hrcu9e6b/3/

<div class="review-type-wrapper-v">     <div class="review-type-inner"  style="height:82%">         <div></div>     </div> </div>  @-webkit-keyframes linev {     {         height: 0;     }     {         height: 100%;     } }  @keyframes linev {     {         height: 0;     }     {         height: 100%;     } }  .review-type-wrapper-v, .review-type-wrapper-h{     border-radius:3px;     border:1px solid $rating-background-dark;     overflow: hidden;     .review-type-inner{         position: absolute;         > div{             background-color: $rating-background-dark;             //position: absolute;             left: 0;             height: 100%;             //width:100%;         }      } }   .review-type-wrapper-v{     position: relative;     width: 14px;     height: 60px;     .review-type-inner{         bottom: 0;         width: 100%;         height: 100%;         > div{             -webkit-animation: linev 3s linear;             animation: linev 3s linear;         }     } } 

you use css3 2d transform. supports ie 10 , above. but, don't think care ie 9 , below because you're using key-frames.

    @-webkit-keyframes linev {          {              height: 0;          }          {              height: 100%;          }      }      @keyframes linev {          {              height: 0;          }          {              height: 100%;          }      }      .review-type-wrapper-v, .review-type-wrapper-h {          border-radius:3px;          border:1px solid #333;          overflow: hidden;      }      .review-type-inner {          position: absolute;      }      .review-type-inner > div {          background-color: #333;          //position: absolute;          left: 0;          height: 100%;          //width:100%;      }      .review-type-wrapper-v {          position: relative;          width: 14px;          height: 60px;      }      .review-type-inner {          bottom: 0;          width: 100%;          height: 100%;      -webkit-transform: rotate(180deg); /* safari */      transform: rotate(180deg);      }      .review-type-inner > div {          -webkit-animation: linev 3s linear;          animation: linev 3s linear;      }
<div class="review-type-wrapper-v">      <div class="review-type-inner" style="height:82%">          <div></div>      </div>  </div>


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -