A pseudo-class is used to define a special state of an element.
Styling an element when a user mouses over it or when it gets focus.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html:active {
background: red;
}
</style>
</head>
<body>
Click anywhere in the screen
</body>
</html>
Styling an element when a user mouses over it or when it gets focus.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html:active {
background: red;
}
</style>
</head>
<body>
Click anywhere in the screen
</body>
</html>
Css:- pseudo class 1
Reviewed by Network security
on
May 23, 2019
Rating:
No comments: