p.title>p.list .list{ display:none; } .title:hover .list{ display:block; } The principle is probably to use css pseudo-classes to achieve hover state response, thereby changing the display of drop-down content.
You can use browser development tools to view its code structure. iQiyi listens for click events. Change the drop-down menu from display:none; to display:block; if you use CSS, you can only use pseudo classes to implement it. The reply above is like that.
p.title>p.list
.list{
display:none;
}
.title:hover .list{
display:block;
}
The principle is probably to use css pseudo-classes to achieve hover state response, thereby changing the display of drop-down content.
drop-down menu, if it is css, you can directly use the parent
class:hover 子class
and then setopacity:1
or even add a transition effect.Use CSS pseudo-classes to achieve
class:hover
. If you want to use transition, there are several waysYou can use browser development tools to view its code structure. iQiyi listens for click events. Change the drop-down menu from display:none; to display:block; if you use CSS, you can only use pseudo classes to implement it. The reply above is like that.