Slide-In Overlay Hover Effect (HTML & CSS)

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ค. 2024
  • Learn how to implement a Slide-In Overlay Hover Effect with HTML and CSS.
    Using slide-in overlays is a nice and engaging way to display additional information to the user and can also be a great space saver for a web page.
    In this video, we go through a few variations of this effect, changing the slide-in direction, the overlay opacity, height etc. And finally, we use just a tiny bit of JavaScript in order to display the overlay upon a click event instead of a hover over the container element.
    Enjoy 😊
    Don’t forget to share, like, subscribe and I would love to hear your thoughts in the comment section below!
    Code for this Project: codepen.io/Coding_Journey/pen...
    Support the Channel 💙☕🙏
    PayPal: paypal.me/CodingJourney
    Suggested Videos:
    Card Flip Effect (HTML & CSS): • Card Flip Effect (HTML...
    Marquee-like Content Scrolling (HTML & CSS): • Marquee-like Content S...
    Decide - Create - Publish - Repeat: • Decide - Create - Publ...
    Codepen: codepen.io/Coding_Journey/
    Twitter: / codingjrney
    Email: codingjourney123@gmail.com
    Subscribe 💖
    / @codingjourney

ความคิดเห็น • 31

  • @freestyler1578
    @freestyler1578 5 ปีที่แล้ว +4

    Amazing hands-on tutorial, thanks!!!!

  • @yuxiwan8917
    @yuxiwan8917 4 ปีที่แล้ว +3

    Great video, step by step with explanation! I love it!

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Thank you! Delighted to hear that 🙂

  • @mayonkkumarbehera3524
    @mayonkkumarbehera3524 4 ปีที่แล้ว +2

    thank you, I find your videos very helpful!!

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Thanks man! Very happy to hear that 🙂

  • @NejdetACAR
    @NejdetACAR 3 ปีที่แล้ว +1

    I haven't seen any other video explaining the topic of "overlay" in such detail. (maybe there is) Thank you very much.

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      Oh thank you 🙂 Very glad you liked it!

  • @Webnoob
    @Webnoob 5 ปีที่แล้ว +1

    Excellent explanation. I like that you show several options on how you can implement the overlay. Great work. Stay tuned 👍🏻

    • @CodingJourney
      @CodingJourney  5 ปีที่แล้ว +1

      Thanks Mario! Much appreciate you taking the time to watch the video and comment! Love the work you are doing with your channel, keep it up!!

  • @sirlancelot8015
    @sirlancelot8015 5 ปีที่แล้ว +1

    Thank you Sir!

  • @Tony-pe3kp
    @Tony-pe3kp 4 ปีที่แล้ว +1

    Nice and smooth! I mean the tutorial, as well as the effect 😉 Thank you, keep it up 👍

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Oh thank you, glad you liked it! You too 😉

  • @mahadirazib3602
    @mahadirazib3602 4 ปีที่แล้ว +2

    ❤️❤️❤️❤️

  • @nicolasshattaoula3354
    @nicolasshattaoula3354 5 ปีที่แล้ว +1

    Keep them coming baby, much love from your home country!

    • @CodingJourney
      @CodingJourney  5 ปีที่แล้ว

      Heheh! Always be chasing you...my superhero 😃💖💖

  • @Frankslaboratory
    @Frankslaboratory 4 ปีที่แล้ว +1

    Everything is better with Batman haha. Great video :)

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Heheh 🙂 Thanks man! Looking forward to see what you are creating next with your coding superpowers 😉🙂

  • @drinkrasniqi672
    @drinkrasniqi672 4 ปีที่แล้ว +3

    I am a simple man. I see Batman, I give a like!

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Heheh 😁 Love it! Keep it simple 😉💙💙

  • @siddharthgandhi7937
    @siddharthgandhi7937 4 ปีที่แล้ว +1

    great job keep going

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว

      Thanks mate! You too 😉💙

  • @powerhouse27
    @powerhouse27 3 ปีที่แล้ว

    Hi, this effect works for me and it's beautiful. I'm using it in a react app and it works perfectly on a local server but when I deploy my website it doesn't work on the website. Does anybody know why it wouldn't work when you deploy the react app?

  • @jackshofner8733
    @jackshofner8733 4 ปีที่แล้ว +1

    How would you do this by clicking on a button in .card.main-content and on a button in card.overlay-content?

    • @CodingJourney
      @CodingJourney  4 ปีที่แล้ว +2

      Well, you would first of course need to add a button to each of these divs, e.g.
      Main (to .main-content) and
      Overlay (to .overlay-content)
      Then change the styling, according to your taste and needs, and in order to achieve the functionality with JavaScript:
      const card = document.querySelector(".card");
      const toggleSlideInBtns = document.querySelectorAll(".toggle-slide-in-btn");
      toggleSlideInBtns.forEach(toggleSlideInBtn => {
      toggleSlideInBtn.addEventListener("click", event => {
      card.classList.toggle("slide-in");
      });
      });
      All the best, keep coding! 😉🙂

    • @jackshofner8733
      @jackshofner8733 3 ปีที่แล้ว +1

      @@CodingJourney You are a genius! Thanks!

    • @jackshofner8733
      @jackshofner8733 3 ปีที่แล้ว +1

      I am starting out, trying to learn HTML/CSS and JavaScript. In the process, I am building a website, which uses cards. My cards are currently using a tooltip method based on a hover. But I did not like the functionality of them. I like the slide-in effect you showed in your video. It is better! This really helps! Again, thanks!

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      Amazing! Learning, while creating actual projects is the way to go 😉 Very glad you found this helpful! Keep up the good work 👍💙

  • @forhadrh
    @forhadrh 3 ปีที่แล้ว +1

    Are you spanish? Your accent seems like that...

    • @CodingJourney
      @CodingJourney  3 ปีที่แล้ว

      Hey 🙂 I'm from Cyprus, but indeed English accent is quite similar to Spanish 😉

    • @forhadrh
      @forhadrh 3 ปีที่แล้ว

      @@CodingJourney Ok...