toggle opacity
This commit is contained in:
parent
a66afce9f4
commit
9195886bea
3 changed files with 16 additions and 2 deletions
|
|
@ -413,6 +413,14 @@ a.button:visited {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.opacity-none {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opacity-full {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.spoiler-text {
|
.spoiler-text {
|
||||||
display: inline;
|
display: inline;
|
||||||
/* These are technically the same, but use both */
|
/* These are technically the same, but use both */
|
||||||
|
|
@ -628,8 +636,8 @@ input[type="radio"] {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 1px;
|
right: 1px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: none;
|
|
||||||
z-index: 1100;
|
z-index: 1100;
|
||||||
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.test {
|
.test {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<button class="scroll-up-button hidden">^</button>
|
<button class="scroll-up-button hidden opacity-none">^</button>
|
||||||
|
|
||||||
<div id="background"></div>
|
<div id="background"></div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,19 @@ function ScrollTo(element) {
|
||||||
function ShowElement(element) {
|
function ShowElement(element) {
|
||||||
|
|
||||||
element.classList.toggle("hidden");
|
element.classList.toggle("hidden");
|
||||||
|
element.classList.toggle("opacity-none");
|
||||||
|
|
||||||
element.classList.add("visible");
|
element.classList.add("visible");
|
||||||
|
element.classList.add("opacity-full");
|
||||||
}
|
}
|
||||||
|
|
||||||
function HideElement(element) {
|
function HideElement(element) {
|
||||||
|
|
||||||
element.classList.toggle("visible");
|
element.classList.toggle("visible");
|
||||||
|
element.classList.toggle("opacity-full");
|
||||||
|
|
||||||
element.classList.add("hidden");
|
element.classList.add("hidden");
|
||||||
|
element.classList.add("opacity-none");
|
||||||
}
|
}
|
||||||
|
|
||||||
function TogglePageScrollElement(root, element, ratio) {
|
function TogglePageScrollElement(root, element, ratio) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue