Show child div on mouse hover of parent - needs javascript?

前端 未结 7 2015
悲哀的现实
悲哀的现实 2021-02-01 13:27

I need to show a div when you house over its parent (default is for the child div to be hidden). Is the only way to do this with javascript? Thanks

7条回答
  •  难免孤独
    2021-02-01 13:40

    No JS required.

    .hidden {
      display: none;
    }
    
    .parent:hover .hidden {
      display: block;
    }

    Hello, I'm a child...

提交回复
热议问题