Power Use Animation
Animation for when a card is using power.
<div data-type="hero" data-title="Bear" data-ciid="124" data-location="me-hero" id="c-124" data-position="faceup" data-name="Bear" data-posx="0" class="card hover-select" data-usefromlocation="hero" data-effectbuttons="Eat" data-powername="Eat" data-health="30" data-atk="0" data-source="claw" style="height: 153px; width: 123.387px;" data-eligibletoattack="0" data-dulstclass="">
<div class="card-inner">
<img src="https://d2t4fc8ff77neh.cloudfront.net/generatedImage/1b16d8bdp_3046506.jpg" class="mediaContent media-content">
</div>
body {
background-image: url(http://i.imgur.com/e5jvL54.jpg);
background-size: stretch;
overflow: hidden;
}
div[data-type="hero"] {
position: absolute;
top: calc(50% - (123.387px / 2));
left: calc(50% - (153px / 2));
width: 123.387px;
height: 153px;
border-top-left-radius: 20em 30em;
border-top-right-radius: 20em 30em;
float:left;
margin-right: -60px;
}
.powerUseAnimation::after {
display: block;
content: "";
color: rgba(255,255,255,0);
width: 100%;
height: 100%;
animation: powerUseAnim 1200ms cubic-bezier(0.39, 0.575, 0.565, 1);
position: absolute;
border-top-left-radius: 20em 30em;
border-top-right-radius: 20em 30em;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.card-inner {
transform-style: preserve-3d;
pointer-events: none;
will-change: transform;
height: 100%;
width: 100%;
}
.card[data-location="me-hero"] img {
border-top-left-radius: 20em 30em;
border-top-right-radius: 20em 30em;
border: 2px solid #808080;
}
.media-content {
height: 100%;
-webkit-user-drag: none;
box-sizing: border-box;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
max-width: 100%;
box-shadow: rgba(0,0,0,.35) 1px 1px 4px;
border-radius: 3px;
}
@keyframes powerUseAnim {
0% {
box-shadow:
inset 0 0 50px rgba(255,255,255,0),
inset 20px 0 80px rgba(255,0,255,0),
inset -20px 0 80px rgba(0,255,255,0),
inset 20px 0 300px rgba(255,0,255,0),
inset -20px 0 300px rgba(0,255,255,0),
0 0 30px rgba(255,255,255,0),
-10px 0 50px rgba(255,0,255,0),
10px 0 50px rgba(0,255,255,0);
}
50% {
box-shadow:
inset 0 0 50px rgba(255,255,255,.4),
inset 20px 0 80px rgba(255,0,255,.4),
inset -20px 0 80px rgba(0,255,255,.4),
inset 20px 0 300px rgba(255,0,255,.4),
inset -20px 0 300px rgba(0,255,255,.4),
0 0 30px rgba(255,255,255,.4),
-10px 0 50px rgba(255,0,255,.4),
10px 0 50px rgba(0,255,255,.4);
color: rgba(255,255,255,1);
font-size: 15rem;
text-indent: -2.5rem;
}
100% {
box-shadow:
inset 0 0 50px rgba(255,255,255,0),
inset 20px 0 80px rgba(255,0,255,0),
inset -20px 0 80px rgba(0,255,255,0),
inset 20px 0 300px rgba(255,0,255,0),
inset -20px 0 300px rgba(0,255,255,0),
0 0 30px rgba(255,255,255,0),
-10px 0 50px rgba(255,0,255,0),
10px 0 50px rgba(0,255,255,0);
color: rgba(255,255,255,0);
font-size: 20rem;
text-indent: -4.5rem;
}
}