Hover pseudo-Class selection definition and usage

Source: Internet
Author: User

Definition and usage of pseudo-class selector e:hover:

Sets the style of the element when it hovers over it.
The e element can be selected by other selectors, such as the use of class selectors, ID selectors, type selectors, and so on.
Special Note: IE6 does not support this selector, but is able to support the A-element: hover, which is only supported by the type-selector selection of the A element: hover.

Syntax structure:

e:hover{Rules}

Browser support:

This selector is supported by IE browser.
Firefox supports this selector.
Google Chrome supports this selector.
This selector is supported by the Opera browser.

Instance code:

      
 
    
 
    CSS Tutorials        
 
  
  
  • HTML area
  • Div+css Zone
  • JavaScript zone
  • jquery Zone

Use the type selector to set the pre-access style of the hyperlink.

      
 
    
 
    CSS Tutorials        
 
  
  
  • HTML area
  • Div+css Zone
  • JavaScript zone
  • jquery Zone

Sets the style of the hyperlink on its mouse hover through the class selector and the ID selector. Not supported in IE6.

      
 
    
 
    Code Farming Tutorial            

The above code can change its background color when the mouse hovers over the Div, but also shows that: the hover pseudo-class is not only scoped to link a element.

  • 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.