Add rotation animation on settings button when loading
This commit is contained in:
parent
12d3f107c1
commit
13b45aa6c6
3 changed files with 14 additions and 1 deletions
|
@ -1401,6 +1401,18 @@ pre.rust {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
@keyframes rotating {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
#settings-menu.rotate img {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
#help-button {
|
||||
font-family: "Fira Sans", Arial, sans-serif;
|
||||
text-align: center;
|
||||
|
|
|
@ -300,8 +300,8 @@ function loadCss(cssFileName) {
|
|||
document.head.append(script);
|
||||
}
|
||||
|
||||
|
||||
getSettingsButton().onclick = event => {
|
||||
addClass(getSettingsButton(), "rotate");
|
||||
event.preventDefault();
|
||||
loadScript(window.settingsJS);
|
||||
};
|
||||
|
|
|
@ -272,5 +272,6 @@
|
|||
if (!isSettingsPage) {
|
||||
switchDisplayedElement(settingsMenu);
|
||||
}
|
||||
removeClass(getSettingsButton(), "rotate");
|
||||
}, 0);
|
||||
})();
|
||||
|
|
Loading…
Add table
Reference in a new issue