I don’t know why no one else has suggested this, but instead of setting the keyframes in the media query you can set the animation in the media query.
@media(max-height:500px)
{
#selectorGroup {
animation: slideUp500 1s forwards;
}
}
@media(max-height:750px)
{
#selectorGroup {
animation: slideUp750 1s forwards;
}
}
@keyframes slideUp500 {
0% { transform: translate3d(0,500px,0); }
100% { transform: translate3d(0,0,0); }
}
@keyframes slideUp750 {
0% { transform: translate3d(0,750px,0); }
100% { transform: translate3d(0,0,0); }
}