CSS notes-applications of the hover attribute except the tag

Source: Internet
Author: User

CSS note-in addition to the tag, the content of the hover attribute is brief: The following may be very simple for most netizens, but I do not know it. There is a piece of HTML like this: div a href = # IMG alt = I am an IMG src1_img.jpg // A/Div. Generally, the CSS pseudo class hover may be very simple for most netizens to write the following code, but I do not know.
There is a piece of HTML like this:

<Div>
<A href = "#">

</A>
</Div>
Generally, the CSS pseudo-class hover does not work for tags other than the tag (FF browser can work, IE6 cannot ):

IMG: hover {
Border: 1px solid #000;/* FF is effective, and IE6 is ineffective */
}
Such a good pseudo-class is really a waste !! However, there is actually a way to implement the hover function of a non-a tag, as written below:

A: hover IMG {
Border: 1px solid #000;/* it can be understood as the IMG label in a on it */
}
^ 0 ^ it's easy to implement. You don't need to edit the troublesome JS statement!

From: http://syue.com/edu/Web/CSS/12683.html

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.