Advertisement
multiarts

Animate BadgeCart

Sep 11th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.93 KB | None | 0 0
  1. // Cart-Badge animation
  2. .cart-badge {
  3.   top:-13px;
  4.   left:-8px;
  5.   color: #fff;
  6.   font-size: 1rem;
  7.   background-color: chocolate;
  8.   padding: 3px 5px;
  9.   position:relative;
  10.   border-radius:100px;
  11.  }
  12. .cart-badge:after,.cart-badge:before {
  13.   content:"";
  14.   width:100%;
  15.   height:100%;
  16.   border-radius:50%;
  17.   position:absolute;
  18.   top:0;
  19.   left:0;
  20.   -webkit-box-shadow:inset 0 0 20px 5px rgba(255,255,255,.4);
  21.   box-shadow:inset 0 0 20px 5px rgba(255,255,255,.4)
  22.  }
  23.  .cart-badge:after {
  24.   -webkit-animation:not-blink 2.1s cubic-bezier(.65,.815,.735,.395) infinite;
  25.   animation:not-blink 2.1s cubic-bezier(.65,.815,.735,.395) infinite
  26.  }
  27.  .cart-badge:before {
  28.   -webkit-animation:not-blink 2.1s cubic-bezier(.165,.84,.44,1) infinite;
  29.   animation:not-blink 2.1s cubic-bezier(.165,.84,.44,1) infinite;
  30.   -webkit-animation-delay:1.15s;
  31.   animation-delay:1.15s
  32.  }
  33.  
  34. //No HTML
  35. <ion-badge class="cart-badge">{{cartItems}}</ion-badge>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement