CSS: hover pseudo class selection definition and usage, hover pseudo

Source: Internet
Author: User

CSS: hover pseudo class selection definition and usage, hover pseudo
Definition and usage of the pseudo-class selector E: hover:

Sets the style of an element when it is hovering over it.
The E element can be selected using other selectors, such as class selector, id selector, and type selector.
Note: IE6 does not support this selector, but supports the hover of Element a, that is, it only supports the hover of element a selected by the Type selector.

Syntax structure:
E:hover{ Rules } 
Browser support:

Internet Explorer supports this selector.
Firefox supports this selection character.
Google Chrome supports this selector.
Operabrowser supports this selector.

Instance code:
<! DOCTYPE html> 

Use the type selector to set the style before the hyperlink access.

<! DOCTYPE html> 

You can set the style of a hyperlink when its mouse is hovering over it by using the class selector and id selector. Not supported in IE6.

<! DOCTYPE html> 

The above code can change the background color when hovering the cursor over the div. It also shows that the hover pseudo class not only links the scope to 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.