EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

:active pseudo-class

Sets the style of an element when it is engaged or active.

CSS 2.1, Section 5.11.3

 

Syntax

selector :active {...}

Parameters

selector

A CSS simple selector

Standards information

Remarks

The default value of the :active pseudo-class is browser-specific.

The :active pseudo-class is most often used with the a element. Windows Internet Explorer 7 and earlier only support using the :active pseudo-class with the a element. "Active" means that the user is navigating the link. The link has been activated, and some action is being performed but is not yet complete.

The :active pseudo-class is often used with :hover, :link, and :visited, the pseudo-classes that affect the other states of a link.

Dynamic HTML (DHTML) expressions can be used in place of the preceding value(s). As of Windows Internet Explorer 8, expressions are not supported in IE8 Standards mode. For more information, see About Dynamic Properties.

Examples

The following style rule uses the :active pseudo-class to set the font-weight and color attributes of an active link in a document.


<style>
    A:active { font-weight:bold; color:purple }
</style>

 

 

표시:
© 2014 Microsoft