What does hover mean in css3

WBOY
Release: 2022-06-08 16:54:35
Original
7687 people have browsed it

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>
Copy after login

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!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template