Card Flip Effect (HTML & CSS)

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 118

  • @user-mu5jw9wn6d
    @user-mu5jw9wn6d 2 роки тому +3

    omg Thank you Your explanation was so good that I could easily understand even though I was Korean. It's amazing. many thanks

    • @CodingJourney
      @CodingJourney  2 роки тому

      Amazing thank you! Keep it up 💙💙

  • @damianrivas
    @damianrivas 4 роки тому +5

    Thank you, this is my favorite 3D Flip effect video because you actually show us how to do it with a click instead of just hover

    • @CodingJourney
      @CodingJourney  4 роки тому +1

      Oh thank you for the lovely comment!! Very glad you found this useful 🙂💙

  • @КонстантинСавка-з9г

    Thank you so much for the tutorial. I've spent two days writing pretty long js script, but you did it in 20mins and code is so short and elegant. Amazing

  • @sumitjha392
    @sumitjha392 3 роки тому +5

    The fact that you add each CSS property by explaining them first makes your tutorial super super awesome. Thanks mate :) Liked and Subscribed :)

    • @CodingJourney
      @CodingJourney  3 роки тому

      Oh thanks for the lovely comment mate! 🙏🙂 Very glad you liked it!! Welcome aboard 💙💙

  • @nirusanhariharan8382
    @nirusanhariharan8382 3 роки тому +2

    Dude I donno how to thank you. Caz I was trying to understand one concept which u said at the video. To be honest I'm not gonna say what is it but not even a single person or website said why that bunch of was there. Everyone passed that and explained except you. Still appreciate and thanks man 🤞🔥

    • @CodingJourney
      @CodingJourney  3 роки тому

      Thanks for the lovely message mate!! My pleasure 🙂 All the best, keep coding 😉💙

  • @mollyexten4508
    @mollyexten4508 3 роки тому +2

    Thank you - I've been searching for a flip card effect that didn't involve absolute positioning on the container - so helpful!

    • @CodingJourney
      @CodingJourney  3 роки тому

      Amazing! Glad it was helpful 🙂 You can always of course absolutely position the card, but that's a special case, I usually prefer presenting the general/default. All the best, keep coding 😉

  • @ben-cb5er
    @ben-cb5er 3 роки тому +2

    Liked and subscribed! Thank you

    • @CodingJourney
      @CodingJourney  3 роки тому

      Awesome, thank you!! Welcome aboard 😉

  • @reshairo
    @reshairo 4 роки тому +2

    I watched many tutorials about css, but this is the best tutorial thanx dude. Anyone can teach but the important thing is the audience or student need to understand. From that end you are best. Thanx

    • @CodingJourney
      @CodingJourney  4 роки тому +1

      Oh thank you for the lovey comment!! 🙂 My pleasure, very glad you liked this! Keep coding 😉💙

    • @reshairo
      @reshairo 4 роки тому +2

      @@CodingJourney noted with many thanx. Waiting for more

  • @indiancomedys552
    @indiancomedys552 3 роки тому +3

    Sir, I'm from india....thank you so much for explaining this concept...I have seen soo many videos on videos on this topic but none of them explained

    • @CodingJourney
      @CodingJourney  3 роки тому

      Oh thank you 🙂 Very glad you found this useful!! 💙

  • @kristian4803
    @kristian4803 3 роки тому +5

    Great tutorial. You do a very good job of explaining why you do the things you do and how it works.

    • @CodingJourney
      @CodingJourney  3 роки тому +1

      Thank you, I appreciate that! Very glad you liked it 🙂

  • @거누권
    @거누권 3 роки тому +2

    Thanks!!! great video.
    I like your channel

    • @CodingJourney
      @CodingJourney  3 роки тому

      Oh thank you, my pleasure 🙂 Thanks for the nice comments and support!! 💙

  • @jorgeguiragossian8488
    @jorgeguiragossian8488 2 роки тому +2

    This is one of the best tutorials I've watched on HTML and CSS. Your tutorial was clear, concise, and informative! Liked and subscribed!

  • @zilondequadrosmaciel1006
    @zilondequadrosmaciel1006 3 роки тому +2

    Very good.

  • @MB-gf6zd
    @MB-gf6zd 5 років тому +2

    Awesome and super well explained !!!
    Many thanks

  • @abs1792
    @abs1792 3 роки тому +1

    thanks a lot, i am clear the rotate flip card design now...

  • @sumonajoti
    @sumonajoti 2 роки тому +1

    ❤❤❤

  • @doorbell1982
    @doorbell1982 5 років тому +3

    WONDERFUL tutorial, and very useful, thanks!!

  • @gilmoretj
    @gilmoretj 4 роки тому +3

    Great tutorial and very nice demo. Well explained.

    • @CodingJourney
      @CodingJourney  4 роки тому

      Thank you 🙂 Very glad you liked it!!

  • @kapilkunwar8762
    @kapilkunwar8762 3 роки тому +2

    Great Sir Loved It

  • @apositron84
    @apositron84 3 роки тому +2

    Thank you so much for this. I'm going to use it to make online flash cards for my students. This must take you such a long time to put together, thank you!

    • @CodingJourney
      @CodingJourney  3 роки тому

      My pleasure 🙂 Yeap, it does take time (I'm sure that you, as a teacher totally get it 😉) but it's worth it! Especially when these projects are being used for such a good cause 🙂 All the best!!

  • @kupaporusku
    @kupaporusku 5 років тому +3

    I like the way how You teach.

    • @CodingJourney
      @CodingJourney  5 років тому +1

      Thank man! I'm trying...sometimes I'm happy with the result, sometimes not...that's life 🙂 All the best, keep it up!!

  • @agrogers1
    @agrogers1 4 роки тому +2

    Excellent tutorial. Thanks! God bless you :)

    • @CodingJourney
      @CodingJourney  4 роки тому

      Thanks man! U2 💙🙂 Very glad you liked it!

  • @LIFE-nr1yg
    @LIFE-nr1yg 4 роки тому +2

    simple and elegant, thank you

    • @CodingJourney
      @CodingJourney  4 роки тому

      Thank you! 😊 Very glad you liked it!!

  • @_STF2023_the_camera.kinemaster
    @_STF2023_the_camera.kinemaster 4 роки тому +1

    Good job man. Thanks for it. Silas from Brazil.

    • @CodingJourney
      @CodingJourney  4 роки тому +1

      Hey Silas my man! Amazing, very glad you liked it 🙂 Warm greetings to Brazil!!

  • @krishnayele5639
    @krishnayele5639 4 роки тому +2

    awesome

  • @emranrastadi6219
    @emranrastadi6219 2 роки тому +1

    powerfull

  • @shubhapradhan8163
    @shubhapradhan8163 4 роки тому +2

    awesome video great explanation!!

    • @CodingJourney
      @CodingJourney  4 роки тому

      Thank youuuu 🙂 Very glad you liked it!!

  • @koutanakano3727
    @koutanakano3727 3 роки тому +2

    I relate how you assign CSS class names xD

  • @jimboli9400
    @jimboli9400 5 років тому +1

    This is great thanks, it really helped with school work

    • @CodingJourney
      @CodingJourney  5 років тому

      That's awesome! All the best with school, keep progressing!!

  • @aaronreuter8256
    @aaronreuter8256 3 роки тому

    Love the tuturial. Is there a way to flip from the center of the card without defining the pixels in the card-container.

  • @mdwaquarazam2026
    @mdwaquarazam2026 4 роки тому +1

    Very nice

  • @friedasimonetta7287
    @friedasimonetta7287 Рік тому

    I don't know if you still respond to this video or not, but I was wondering if there is a way to have the flip stay in one direction (i.e., image flips to the left, and then it flips to the left again, flips forward, and then it flips forward again, etc.)? This is kind of hard for me to explain this, so I hope you at least somewhat understand what I mean.

  • @michaeldoherty9487
    @michaeldoherty9487 4 роки тому

    great video! Any way to make it flip when clicked without using javascript? using only html, css and php?

  • @davidglabais4919
    @davidglabais4919 3 роки тому

    Excellent work my friend! I very much enjoyed your tutorial! I'm wondering though why my images are not smooth transitioning on click but they kind of 'bounce' or "jiggle" a little on transition? I'm using SVG illustrations with all objects grouped together. Any advice would be greatly appreciated and thank you so much!

    • @davidglabais4919
      @davidglabais4919 3 роки тому

      I notice this was only happening in Firefox browser! Works perfectly in Brave and Chrome! Any ideas would be greatly appreciated. Thank you

  • @angeloturri1961
    @angeloturri1961 5 років тому +2

    Great video bro. Only one question: when I try to create multiple flip-cards, only one card will respond to my clicking, the rest don't respond. How can I adjust my JS to apply the toggling to all elements in a class?

    • @CodingJourney
      @CodingJourney  5 років тому +4

      Thanks man! In this case you would want to select all cards (so use querySelectorAll instead of querySelector), loop through selected cards (e.g. with a for-loop or a forEach method) and add the "click" event listener to each card. A working code snippet for this purpose would be the following:
      const flipCardContainers = document.querySelectorAll(".flip-card-container");
      flipCardContainers.forEach(function(flipCardContainer) {
      flipCardContainer.addEventListener("click", function() {
      flipCardContainer.classList.toggle("flip");
      });
      });
      All the best!!

    • @angeloturri1961
      @angeloturri1961 5 років тому +1

      @@CodingJourney Thank you so much :D

  • @Tony-pe3kp
    @Tony-pe3kp 5 років тому +1

    Excellent thanks!!

  • @saheduzzamansobuj4345
    @saheduzzamansobuj4345 4 роки тому +1

    Thanks man!

  • @vinaymathrubai1244
    @vinaymathrubai1244 4 роки тому

    Super tutorials, best work thank you somuch

    • @CodingJourney
      @CodingJourney  4 роки тому

      Thank you for this lovely comment man! Very happy to hear that 🙂

  • @robincollins9423
    @robincollins9423 4 роки тому +1

    Such a good video. However, having difficulty getting the JS to work do you have a source code for that please?

    • @robincollins9423
      @robincollins9423 4 роки тому +1

      I worked it out I still had :flip rather than .flip

    • @CodingJourney
      @CodingJourney  4 роки тому +1

      Thank you 🙂 You can find a link in the description! However, I don't think I've included the JS part...so for that you will have to follow the video instructions...that shouldn't be more than a couple of minutes starting from 18:00 🙂 There was also a question in the comments about adding the "click" event listener to multiple cards so you might also want to check that answer! Good luck!! 🙂

  • @ciaranogrady7653
    @ciaranogrady7653 4 роки тому +1

    I'm trying to do multiple cards on the same page but can only get the click to work for the first card. Any idea on how to do the querySelector for multiple cards?

    • @CodingJourney
      @CodingJourney  4 роки тому +1

      Hello! I'm pasting my reply to a similar question so that you don't have to go through the comments:
      In this case you would want to select all cards (so use querySelectorAll instead of querySelector), loop through selected cards (e.g. with a for-loop or a forEach method) and add the "click" event listener to each card. A working code snippet for this purpose would be the following:
      const flipCardContainers = document.querySelectorAll(".flip-card-container");
      flipCardContainers.forEach(function(flipCardContainer) {
      flipCardContainer.addEventListener("click", function() {
      flipCardContainer.classList.toggle("flip");
      });
      });
      Hope this helps! All the best, keep coding 😉💙

    • @ciaranogrady7653
      @ciaranogrady7653 4 роки тому +2

      @@CodingJourney Thank you so much! Amazing tutorial!

  • @syediqbalahmed3176
    @syediqbalahmed3176 5 років тому

    nice ... because good working ...

  • @ektanagrale6911
    @ektanagrale6911 Рік тому

    how to put many cards horizontally

  • @MsRobynM
    @MsRobynM 4 роки тому +1

    Great video but does not seem to work on Safari. On hover just get a reversed pic. Anyone know why or how it's fixed?

    • @CodingJourney
      @CodingJourney  4 роки тому

      Hello 🙂 Thanks and sorry for the late reply! Unfortunately I currently don't have access to Safari browser so that I can debug but maybe this is due to the backface-visibility property...I think Safari still requires a prefix. So maybe the following would do the job:
      -webkit-backface-visibility: hidden; /* Safari */
      backface-visibility: hidden;
      All the best, keep coding 😉🙂

    • @MsRobynM
      @MsRobynM 4 роки тому +1

      @@CodingJourney That's exactly what it was. It all works perfectly now on Safari. Thanks.

    • @CodingJourney
      @CodingJourney  4 роки тому

      Amazing! Thanks for pointing this out 🙂

  • @JonathanAyers
    @JonathanAyers 3 роки тому

    For some reason when my card flips - it remains visible? I can now see the back of the card around the image that is on the front. Any thoughts?

    • @CodingJourney
      @CodingJourney  3 роки тому +1

      Hey mate! There's a (CodePen) link to this project in the description. If that works fine for you, then you can compare the code and hopefully make it work as intended!! All the best 💙

    • @JonathanAyers
      @JonathanAyers 3 роки тому

      @@CodingJourney Nope. Same result unfortunately. I'm giving up for now. I did save, though. Thanks! Not sure what I'm doing wrong.

    • @CodingJourney
      @CodingJourney  3 роки тому

      Did you set "transform-style: preserve-3d;" for the ".flip-card"? But it could be anything, it is impossible to debug without looking at the code...I'm quite sure that if you really want to make it work, you eventually will 🙂 Keep coding 😉💙

  • @chiuhc
    @chiuhc 4 роки тому +1

    Anyone knows if this working on safari and ios safari?? I've done one and checked can i use and it seems safari is not supported??

    • @CodingJourney
      @CodingJourney  4 роки тому

      Hello! Check out the comment by MsRobynM and the solution we came up with. Hopefully that solves the problem...All the best!! 😉

  • @AbdullahAlMasud1995
    @AbdullahAlMasud1995 5 років тому

    Lovely brother....

  • @jackiejack4139
    @jackiejack4139 4 роки тому

    hello! can this move side to side instead of flipping front and back?

    • @CodingJourney
      @CodingJourney  4 роки тому

      Hey 🙂 In general, anything you imagine, you can do 😉 This video is about the card flip effect though! I've also created a video about the slide-in overlay effect, feel free to check it out, maybe it is closer to what you are looking for! All the best, keep coding 🙂💙

    • @jackiejack4139
      @jackiejack4139 4 роки тому

      @@CodingJourney Thank You for your reply! I am actually looking at this: ua-cam.com/video/pZZAVRHKsvg/v-deo.html , will your tutorial be able to do that?

    • @CodingJourney
      @CodingJourney  4 роки тому

      No, that's an entirely different component! You can ask that specific creator for guidance! Good luck 💙

  • @comunicacaodigital8033
    @comunicacaodigital8033 4 роки тому

    como faz para colocar um cartão ao lado do outro?

  • @oengkimchhay
    @oengkimchhay 4 роки тому

    You write ( div.flip-card ) then it's to be ()
    what is a shortcut?

    • @CodingJourney
      @CodingJourney  4 роки тому

      Hey! 🙂 You can do this due to the Emmet plug-in (if you are using Visual Studio Code then it's already there, otherwise you may have to install it).
      So by typing:
      div.flip-card + enter/return (or tab)
      You get:
      For the special case of "div" you can simply type:
      .flip-card + enter/return (or tab)
      And you still get:
      I hope this answers your question! All the best, keep coding 😉

    • @oengkimchhay
      @oengkimchhay 4 роки тому

      @@CodingJourney i used Adobe Dreamwewer, How could i do?

    • @CodingJourney
      @CodingJourney  4 роки тому

      Unfortunately I've never used the Adobe Dreamwewer editor so I can't give you specific instructions on how to enable Emmet. I'm sure you will eventually figure it out, good luck!

  • @mariaaa4148
    @mariaaa4148 4 роки тому +1

    is this responsive? if not how do i make it responsive?

    • @CodingJourney
      @CodingJourney  4 роки тому

      Hello 🙂 In order to concentrate on the main goal of this tutorial, which was the card flip effect implementation, I used for example fixed width and height for the card. You can always use media queries in order to control the layout for different screen sizes. For example, in order to reduce the card size for smaller screens you could do the following in CSS:
      @media(max-width:767px) {
      .flip-card-container {
      width: 240px;
      height: 320px;
      }
      }
      All the best!! 🙂

  • @CyrusCole
    @CyrusCole 5 років тому

    I'm having a bit of an issue. Everytime my mouse hovers close to the edge of the card, it kind of flickers back and forth and doesnt always rotate. Please help me

    • @CodingJourney
      @CodingJourney  5 років тому

      Hey!! There shouldn't be a flickering issue while hovering close to edges, since flipping occurs when hovering over the flip-card-container element, which itself doesn't move. I think if you follow the tutorial carefully you should be fine or, if you don't have time for this, you can find the final code for this project in the description link. Keep it up!!!

    • @CyrusCole
      @CyrusCole 5 років тому +1

      @@CodingJourney Thank you for the help. I realised I made a mistake and decided to stop with this idea. I'm trying to make a coffee website for my school project. And I was trying to incorporate this tutorial with the cards that I put into a display: grid. But I made a mistake because the cards were doing that jitter thing. So I dumped it and put all the info onto the card without any effects

    • @CodingJourney
      @CodingJourney  5 років тому

      Very nice! Adjustability, that's the spirit 🙂 All the best with school project!!!

  • @juliuso1
    @juliuso1 5 років тому

    The flip effect is buggy on Safari and iOS devices. But otherwise a good tutorial.

    • @Pretence01
      @Pretence01 5 років тому

      Safari is the new IE

  • @anhduc1123
    @anhduc1123 5 років тому

    How to make it click to flip ?

    • @CodingJourney
      @CodingJourney  5 років тому +1

      Hey man! I think explanation for what you are asking for, starts at 18:00. Good luck!!