CSS notes-except for the application of the hover attribute outside a tag

Source: Internet
Author: User

The following may be easy for most users, but I do not know.

There is a paragraph of this HTML:

<div>
<a href="http://j5c.cnblogs.com/index.php#">

</a>
</div>

General hover This CSS pseudo class has no effect on tags other than label a (FF browser can work, IE6 not available):

img:hover{
border:1px solid #000;/*FF下有效果,IE6下没有效果*/
}

Such a good pseudo class is really a waste!! However, there is actually a way to implement the hover function of non-a tags, as follows:

a:hover img{
border:1px solid #000;/*可以理解为鼠标在其上的a里面的img标签*/
}

^0^ is very simple to achieve, do not edit the trouble of the JS statement!

To love CSS friends, the above content for the author small Joe humble opinion, reprint please famous: Author small Joe Address: Http://xiebiji.com/2008/10/hover

Related Article

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.