# Nav Li: hover UL and # nav Li A: hover ul

Source: Internet
Author: User

# 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.