CSS verbessert für Login&Register. javscsript code für magnetic button effect noch in entwicklung.

This commit is contained in:
2026-03-16 12:53:57 +01:00
parent 986629f0a5
commit 723bc835ec
4 changed files with 189 additions and 42 deletions
+14
View File
@@ -0,0 +1,14 @@
const button = document.querySelector(".magnetic")
button.addEventListener("mousemove", (e) => {
const rect = button.getBoundingClientRect()
const x = e.clientX - rect.left - rect.width / 2
const y = e.clientY - rect.top - rect.height / 2
button.style.transform = `translate(${x * 0.3}px, ${y * 0.3}px)`
})
button.addEventListener("mouseleave", () => {
button.style.transform = "translate(0,0)"
})