tuilajboy
Gà con
cho mình hỏi trong dòng code này mình sai chỗ nào mà khi hover qua button thì phần menu không hiện vậy
code HTML : "
<!DOCTYPE html>
<html>
<head>
<title>My Family</title>
<link rel="stylesheet" href="homepage.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Afacad+Flux:[email protected]&display=swap" rel="stylesheet">
</head>
<body>
<div id="total">
<button id="hideshow">Show/Hide</button>
<div id="timeline">
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">7</a>
<a href="#">8</a>
<a href="#">9</a>
<a href="#">10</a>
<a href="#">11</a>
<a href="#">12</a>
<a href="#">13</a>
<a href="#">14</a>
</div>
</div>
</body>
</html>
"
code css : "
*{
font-family: "Afacad Flux", sans-serif;
}
body{
background-repeat: auto;
--angle: 45deg;
background: linear-gradient(var(--angle), oklab(92.6% 0.027 0.032), oklab(92.8% 0.023 0.03), oklab(90.1% 0.039 0.028), oklab(87% 0.053 0.029))
}
button{
padding: 15px 30px;
display: flex;
float: right;
}
#timeline{
height: 90%;
background-color: aliceblue;
position: absolute;
top:60px;
right: 0;
display: none;
z-index: 1;
}
#timeline a {
padding: 15px 16px;
display: block;
min-width: 200px;
text-decoration: none ;
text-align: center;
}
#timeline a:hover{
background-color: aquamarine;
}
#hideshow:hover #timeline{display: block;}
"