add hover class to :hover related css rules

This commit is contained in:
Yanzhen Yu
2018-10-31 19:02:26 +08:00
parent 689c788669
commit 7f806128ed
4 changed files with 124 additions and 2 deletions

31
test/html/hover.html Normal file
View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>hover selector</title>
<style>
div:hover {
background: orange;
}
div:hover::after {
position: absolute;
left: 0;
top: 100%;
content: 'dropdown';
width: 100px;
height: 200px;
background: lightblue;
}
</style>
</head>
<body>
<div>hover me</div>
</body>
</html>