pseudo classes in css part 1 (:hover)

pseudo classes in css part 1 (:hover)

Note: This is the first part of the series dedicated to the pseudo-classes of CSS.

In this part, we'll understand the pseudo-class :hover but if you want to jump to any other pseudo-class, be my guest and click on the links provided below:

part 1:?pseudo-class :hover

part 2:?pseudo-class :link

part 3:?pseudo-class :visited

part 4:?pseudo-class :active

part 5:?pseudo-class :target

Let's see what MDN has to say: The :hover CSS pseudo-class matches when the user interacts with an element with a pointing device but does not necessarily activate it.?It is generally triggered when the user hovers over an element with the cursor (mouse pointer).

Talk is cheap, let me show you the code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>Subscribe to my daily newsletter</h1>
</body>
</html>        

[Click to continue reading...]

要查看或添加评论,请登录

社区洞察

其他会员也浏览了