I use the bootstrap default carousel . I want both carousel-control to appear when: hover on the slider. Actually for this I ask:

.carousel-control { display: none } .carousel-inner:hover + .carousel-control { display: inline-block } 
As a result, the controls are not displayed, but with: hover on .carousel-inner, only the left one appears. Oddly enough, because display: none worked on both .carousel-control. No other changes were made regarding the display. Tell me, please, what's the problem if someone has come across something similar.

  • one
    Try changing this to .carousel-inner:hover ~ .carousel-control - Yuri
  • Never heard of this form of recording, but it works. Thank you. Could you throw a reference to the information / documentation on this form of recording? - Alexander Sigida
  • Here is the information: htmlbook.ru/css/selector/sibling ; Here is an example: jsfiddle.net/ga2r1yoe - Yuri

0