# What is the difference between nav Li: hover UL and # nav Li A: hover ul?
── ─
# The difference between nav Li: hover UL and # nav Li A: hover ul is that
The former is the UL style when the mouse is over Li
The latter is the UL style when the mouse is over a of Li.
── ─
The browser should be considered for this issue.
In css1.1: the hover pseudo class can only be used on the tag, and can be used on all tags after css2.0. That is to say, the current ie7.0li: hover still does not work. You need to use scripts to achieve this hover effect.
── ─
Haha, non-a label: hover pseudo class is not supported in IE browser
Try to use a pseudo class
If compatibility is required, you can use JavaScript to add an onmouseover onmouseout event to the specified tag.
VaR items = Document. getelementbyidx_x_x ("nav"). getelementsbytagname_r ("Li ");
For (I = 0; I
{
Items [I]. onmouseover = function () {... this. classname = "over "...};
Items [I]. onmouseout = function (){...};
}
# Nav Li: hover UL and # nav Li A: hover ul