Home  >  Article  >  Web Front-end  >  Examples of usage of hover pseudo-class in CSS

Examples of usage of hover pseudo-class in CSS

黄舟
黄舟Original
2017-10-21 10:37:341773browse

: The use of hover, that is, the style setting made when the mouse pointer moves into the element

Example 1



    
    demo01
    

The above situation exists when the mouse pointer moves into an element and the element itself changes to a new style through:hover

Example 2


##


    
    demo01
    

In the above example , when there is a parent-child relationship, you can change the style of the child through the parent's :hover, written as

.container:hover .content, there is a space after hover; but , Child: hover cannot change the style of the parent

Example 3



    
    demo01
    

The above is the detailed content of Examples of usage of hover pseudo-class in CSS. 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