0

I currently have a hover effect on a div using CSS (code below) how do I make the effect occur on hover and on click.

I believe its using .hover as well as using .active but how would I use them together on the CSS code below.

.maincontentdiv:hover > .slideup {
min-height: 50%;
}
user3760124
  • 415
  • 1
  • 4
  • 6

1 Answers1

1

In CSS

.maincontentdiv:active > .slideup, .maincontentdiv:hover > .slideup { 
   min-height: 50%;
}

Is equal to click event. Set same properties for more than one object, by seperating it using , sign. It is used to seperate each query in the CSS selector.

Afzaal Ahmad Zeeshan
  • 15,669
  • 12
  • 55
  • 103