add transition to hamburger menu

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-05-03 22:08:00 +00:00
parent 2f459f7c5b
commit 08fc8d127b

View File

@ -61,11 +61,17 @@ nav a, nav h1, nav label {
display: inline-block;
}
#hamitems {
display: none;
#hamburger ~ #hamitems a {
height: 0;
padding: 0 0.5em;
border: 0;
transition: height 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
#hamnav input:checked ~ #hamitems {
display: block;
#hamburger:checked ~ #hamitems a {
height: 2.5em;
padding: 0.5em;
border: 1px solid #333;
transition: height 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
}