Smoothly transition between pages
This commit is contained in:
parent
1f18c43de8
commit
a657adf9b1
1 changed files with 8 additions and 6 deletions
|
|
@ -18,7 +18,9 @@ body {
|
||||||
nav {
|
nav {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
width: fit-content;
|
width: intrinsic; /* Safari/WebKit uses a non-standard name */
|
||||||
|
width: -moz-max-content; /* Firefox/Gecko */
|
||||||
|
width: -webkit-max-content; /* Chrome */
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
|
@ -57,24 +59,24 @@ nav .item:hover, nav .item[active] {
|
||||||
animation: Rainbow 20s ease-in-out infinite;
|
animation: Rainbow 20s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav .item:hover:last-of-type, nav .item[active]:last-of-type {
|
nav .item:last-of-type {
|
||||||
border-top-right-radius: 16px;
|
border-top-right-radius: 16px;
|
||||||
border-bottom-right-radius: 16px;
|
border-bottom-right-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav .item:hover:first-of-type, nav .item[active]:first-of-type {
|
nav .item:first-of-type {
|
||||||
border-top-left-radius: 16px;
|
border-top-left-radius: 16px;
|
||||||
border-bottom-left-radius: 16px;
|
border-bottom-left-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: none;
|
max-height: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity ease-in-out 150ms;
|
transition: opacity ease-in-out 150ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shown{
|
.shown{
|
||||||
display: block;
|
max-height: auto;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition: ease-in-out 150ms;
|
transition: ease-in-out 150ms;
|
||||||
}
|
}
|
||||||
|
|
@ -89,4 +91,4 @@ section {
|
||||||
|
|
||||||
.modal-content {
|
.modal-content {
|
||||||
max-width: 1024px;
|
max-width: 1024px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue