1
0
Fork 0

update theme button

This commit is contained in:
nanxiaobei 2021-08-21 04:05:13 +08:00
parent 7bd14006f6
commit 7abe373063
2 changed files with 11 additions and 12 deletions

View file

@ -65,8 +65,7 @@ body > * {
} }
.not-ready, .not-ready,
.not-ready *, .not-ready * {
.not-ready *::before {
transition: none !important; transition: none !important;
} }
@ -183,21 +182,17 @@ img {
} }
.btn-theme { .btn-theme {
align-self: center;
width: 3rem; width: 3rem;
height: 3rem;
margin-left: 2rem; margin-left: 2rem;
overflow: hidden;
font-size: 3rem;
cursor: pointer; cursor: pointer;
background: url(./theme.png) left / cover no-repeat;
transition: background-position 0.4s steps(6);
} }
.btn-theme::before { .dark .btn-theme {
white-space: nowrap; background-position: right;
content: '☀️🌕🌖🌗🌘🌑🌙';
transition: transform 0.4s steps(6);
}
.dark .btn-theme::before {
transform: translateX(-18rem);
} }
.menu { .menu {
@ -210,6 +205,10 @@ img {
margin-left: var(--gap); margin-left: var(--gap);
} }
.menu a.active {
opacity: 0.4;
}
.social-icon { .social-icon {
width: 3rem; width: 3rem;
margin-left: 3rem; margin-left: 3rem;

BIN
static/theme.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB