toggle opacity

This commit is contained in:
ReznoRMichael 2021-02-16 19:29:42 +01:00
parent a66afce9f4
commit 9195886bea
3 changed files with 16 additions and 2 deletions

View file

@ -413,6 +413,14 @@ a.button:visited {
display: block;
}
.opacity-none {
opacity: 0;
}
.opacity-full {
opacity: 1;
}
.spoiler-text {
display: inline;
/* These are technically the same, but use both */
@ -628,8 +636,8 @@ input[type="radio"] {
position: fixed;
right: 1px;
bottom: 0;
display: none;
z-index: 1100;
transition: all 0.3s ease;
}
.test {

View file

@ -30,7 +30,7 @@
</head>
<body>
<button class="scroll-up-button hidden">^</button>
<button class="scroll-up-button hidden opacity-none">^</button>
<div id="background"></div>

View file

@ -10,13 +10,19 @@ function ScrollTo(element) {
function ShowElement(element) {
element.classList.toggle("hidden");
element.classList.toggle("opacity-none");
element.classList.add("visible");
element.classList.add("opacity-full");
}
function HideElement(element) {
element.classList.toggle("visible");
element.classList.toggle("opacity-full");
element.classList.add("hidden");
element.classList.add("opacity-none");
}
function TogglePageScrollElement(root, element, ratio) {