CSS pseudo-class selector active simulates JavaScript click events

Source: Internet
Author: User

I. Description

Sets the style of an element when it is activated by the user (an event that occurs between mouse clicks and releases).

IE7 and earlier browsers only support the A-element: active, which supports other elements from IE8: Active.

Another: If you need to define a hyperlink: Before the visit, mouse hover, currently clicked, has visited the 4 pseudo-class effects, and did not follow a consistent writing order, different browsers may have different performance. The 4 states of a hyperlink need to have a specific writing order to take effect. Note that the a:hover must be located after A:link and a:visited, and a:active must be behind a:hover. The reliable Order is: l (link) ov (visited) e H (hover) A (active) TE, which is summed up in two words like (love) and nasty (hate). Link

Ii. examples
<style>. active-example{width:100px;        height:100px;        Transition:all 1s ease-in-out;    background:red;        }. active-example:active{border-radius:50%;    Background:blue; }</style><div class= "Active-example" ></div>

CSS pseudo-class selector active simulates JavaScript click events

This article from "Do not know not to ask" blog, please be sure to keep this source http://mazey.blog.51cto.com/12997993/1948121

CSS pseudo-class selector active simulates JavaScript click events

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.