1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-10-31 10:36:53 +00:00

improve card animation

This commit is contained in:
devfake 2015-06-23 08:38:14 +02:00
parent 0395812f34
commit c0230ebba9

View File

@ -7,31 +7,17 @@
} }
.bla { .bla {
padding: 5px; padding: 4px;
float: left; float: left;
border-radius: 14px; border-radius: 14px;
margin: 100px; margin: 100px;
position: relative; position: relative;
box-shadow: 0 0 2px 0 orange;
} }
/*.shadow {
border-radius: 40%;
box-shadow: 0 0 30px 10px #ffa500;
content: "";
height: calc(100% - 40px);
left: 10px;
position: absolute;
width: calc(100% - 20px);
z-index: 1;
transition: all 0.3s ease-in-out 0s;
-webkit-animation: Shadow 2s ease infinite;
-moz-animation: Shadow 2s ease infinite;
animation: Shadow 2s ease infinite;
}*/
.shadow { .shadow {
border-radius: 50%; border-radius: 35%;
box-shadow: 0 0 15px 14px #ffa500; box-shadow: 0 0 15px 14px #ffa500;
content: ""; content: "";
height: calc(100% - 40px); height: calc(100% - 40px);
@ -109,51 +95,18 @@
} }
} }
/*@-webkit-keyframes Shadow { .overlay-card {
0% { background: linear-gradient(2deg, rgba(255,255,255,.05), rgba(255,255,255,.3), rgba(255,255,255,.1));
top: 10px; background-size: 800% 800%;
box-shadow: 0 10px 30px 10px #ffa500; position: absolute;
} z-index: 20;
25%{top: 20px} width: calc(100% - 10px);
50%{ height: calc(100% - 10px);
top: 30px;
box-shadow: 0 -10px 30px 10px #ffa500; -webkit-animation: AnimationName 10s ease infinite;
} -moz-animation: AnimationName 10s ease infinite;
75%{top: 20px} animation: AnimationName 10s ease infinite;
100%{top: 10px;
box-shadow: 0 10px 30px 10px #ffa500;
}
} }
@-moz-keyframes Shadow {
0% {
top: 10px;
box-shadow: 0 10px 30px 10px #ffa500;
}
25%{top: 20px}
50%{
top: 30px;
box-shadow: 0 -10px 30px 10px #ffa500;
}
75%{top: 20px}
100%{top: 10px;
box-shadow: 0 10px 30px 10px #ffa500;
}
}
@keyframes Shadow {
0% {
top: 10px;
box-shadow: 0 10px 30px 10px #ffa500;
}
25%{top: 20px}
50%{
top: 30px;
box-shadow: 0 -10px 30px 10px #ffa500;
}
75%{top: 20px}
100%{top: 10px;
box-shadow: 0 10px 30px 10px #ffa500;
}
}*/
@-webkit-keyframes AnimationName { @-webkit-keyframes AnimationName {
0%{background-position:51% 0%} 0%{background-position:51% 0%}
@ -175,6 +128,7 @@
<div class="bla ani"> <div class="bla ani">
<img src="http://80.240.132.120/gwent/assets/cards/ballista1.png" class="card" width="150" height="auto"> <img src="http://80.240.132.120/gwent/assets/cards/ballista1.png" class="card" width="150" height="auto">
<div class="shadow"></div> <div class="shadow"></div>
<div class="overlay-card"></div>
</div> </div>
</div> </div>