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}".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
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:
(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!