-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added rotation effect to cards #35
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently the flip animation is not proper, search about backface visibility
and that will fix the issue
refer to this example : link
@@ -91,6 +91,7 @@ function toggleSound(){ | |||
|
|||
// unset image src when either card flip or show all cards | |||
const unsetImgSource = (card) =>{ | |||
flip(card) | |||
card.children[0].src="#"; // Removing image src so that it isn't visible through HTML | |||
card.children[0].alt="card front face"; // Removing image alt so that it isn't visible through HTML | |||
card.children[1].style.display="block"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hiding/unhiding the front pattern was temporary till this issue. Now after adding the rotation, there should be no need to hide/unhide it, as it should go backside.
so remove that
Thanks for the feedback @dev-lovedeep :-) I'll try fixing the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other things look good, just fix the images
Made changes so that the card appears to flip on clicking.