Launch Countdown Timer using Flexbox, CSS & jQuery
Design comparison
Solution retrospective
I faced problem while making the card flip from the middle, when a number changes, and while changing the colour of svg
at hover
I somehow managed to make card flip from the middle using complex jQuery:
const flip = function ($el) {
const $elClone = $el
.clone()
.css({
position: 'absolute',
top: '0',
left: '0',
'z-index': '10',
'background-color': 'hsl(236, 21%, 26%)',
})
.prependTo($el.parent());
setTimeout(() => $elClone.addClass('flip'));
setTimeout(() => $elClone.fadeOut(() => $elClone.remove()));
};
I got the solution of my second problem from internet, I don't even understand this:
a:hover img {
filter: invert(53%) sepia(39%) saturate(3008%) hue-rotate(312deg)
brightness(103%) contrast(97%);
}
Community feedback
- @grace-snowPosted over 3 years ago
Hi
it doesn't flip for me, looks sort of broken as the number changes. Its like one half changes, then a tiny delay and then the other half catches up...
I tried to get a screenshot of it but it didn't come out in the image
0@grace-snowPosted over 3 years agoThere are lots of examples on codepen without jquery if you want to try out those and see if they work better
0@vatsalsinghkvPosted over 3 years ago@grace-snow and that happened on desktop? I got the same delay issue but on my mobile, it was smooth on desktop
0@vatsalsinghkvPosted over 3 years ago@grace-snow
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord