1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
div.toTop { background-color: var(--foregroundColour); border-radius: calc(1rem / 3); bottom: 1rem; cursor: pointer; display: block; height: 1rem; left: calc(100vw / 2 - 6rem / 2); opacity: calc(1 / 2); position: fixed; width: 6rem; z-index: 1; } div.toTop:hover { height: calc(3rem / 2); opacity:1; }