" to ensure that the selector is valid, the syntax is "element:hover{style code}"."/> " to ensure that the selector is valid, the syntax is "element:hover{style code}".">

Home  >  Article  >  Web Front-end  >  What does hover mean in css3

What does hover mean in css3

WBOY
WBOYOriginal
2022-04-18 16:14:277662browse

Hover in css3 means "hover", and ":hover" is a pseudo-class selector; this selector applies to all elements and can add special styles to elements when the mouse moves over them. In IE, "" must be declared to ensure that the selector is valid, and the syntax is "element:hover{style code}".

What does hover mean in css3

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

What does hover mean in css3

In css:hover is a pseudo-class selector. The :hover pseudo-class selector adds a special style to this element when the mouse moves over it. The :hover selector applies to all elements.

:Hover is a special style added when the mouse moves over the link.

In IE, "" must be declared to ensure that the ":hover" selector can be effective

The example is as follows:

<!DOCTYPE html>
<html>
<head>
<style>
p:hover
{
background-color:yellow;
}
</style>
</head>
<body>
<p>改变背景颜色</p>
<p><b>注释:</b>:hover 选择器鼠标指针在其上浮动的链接设置样式。</p>
</body>
</html>

Output result:

What does hover mean in css3

(Learning video sharing: css video tutorial)

The above is the detailed content of What does hover mean in css3. 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
Previous article:What is vw in cssNext article:What is vw in css