Add fade-in animation
[MAILPOET-3088]
This commit is contained in:
@@ -30,3 +30,31 @@
|
|||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_animation_fadein {
|
||||||
|
animation: fade-in 1s 1 cubic-bezier(.77, 0, .175, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailpoet_form_overlay_animation_fadein {
|
||||||
|
animation: fade-in-overlay 1s 1 cubic-bezier(.77, 0, .175, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-in {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-in-overlay {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: .7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -88,6 +88,7 @@ jQuery(($) => {
|
|||||||
const animation = form.data('animation');
|
const animation = form.data('animation');
|
||||||
if (animation !== '') {
|
if (animation !== '') {
|
||||||
formDiv.addClass(`mailpoet_form_animation_${animation}`);
|
formDiv.addClass(`mailpoet_form_animation_${animation}`);
|
||||||
|
formDiv.prev('.mailpoet_form_popup_overlay').addClass(`mailpoet_form_overlay_animation_${animation}`);
|
||||||
}
|
}
|
||||||
const background = form.data('background-color');
|
const background = form.data('background-color');
|
||||||
formDiv.css('background-color', background || 'white');
|
formDiv.css('background-color', background || 'white');
|
||||||
|
Reference in New Issue
Block a user