Home>Article>Web Front-end> How to use css hover

How to use css hover

藏色散人
藏色散人 Original
2020-02-06 11:49:41 11532browse

How to use css hover

css hover usage

CSS :hover selector definition and usage

:hover selector is used to select the element on which the mouse pointer is floating.

Tip: The :hover selector can be used on all elements, not just links.

Tip: The :link selector sets the style of links pointing to pages that have not been visited, the :visited selector is used to set links to pages that have been visited, and the :active selector is used for active links.

Recommended learning:CSS tutorial

Note: In the CSS definition, :hover must be located after :link and :visited (if present), so that the style can take effect .

Example:

Select the element on which the mouse pointer is floating and set its style:

    
PHP Google Wikipedia

注释::hover 选择器鼠标指针在其上浮动的链接设置样式。

Effect:

How to use css hover

Note: All major browsers support the :hover selector.

The above is the detailed content of How to use css hover. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn