How to affect other elements when one element is hovered

Поделиться
HTML-код
  • Опубликовано: 27 июн 2022
  • #css #html #hover

Комментарии • 5

  • @MarioDuarteMD19
    @MarioDuarteMD19 Год назад +1

    You are a TRUE Giga Chad! This tutorial is so helpful because not only does it work remarkably, it also gets straight to the point. Please keep it coming! I have no doubt that this channel has some MASSIVE potential

  • @-NguyenBuiAnhKhoa
    @-NguyenBuiAnhKhoa 8 месяцев назад +1

    When I try to do the opposite, like hover #box2 but the effect doesn't happen with #box1. How can I make this work. Thank you

  • @vishnups9793
    @vishnups9793 Год назад

    thank youu

  • @arunpawar6774
    @arunpawar6774 Год назад

    how can hover on 2 or more different id div show effect on single another id div please reply 🙏

    • @code-tox6203
      @code-tox6203  Год назад

      example
      #hover:hover+#h1{color: red;}
      👆this will work for single element but if you want 2 or more👇 you have to write multiple block of code, for each element different block
      example
      *//for element 1//**
      #hover:hover+#h1{color: red;}
      *//for element 2//**
      #hover:hover+#h1+#h2{color: red;}
      *//for third element //*
      #hover:hover+#h1+h2+h3{color: red;}
      i tried to make in one line but it wasn't work for me. i did quick research but not satisfied.