update
This commit is contained in:
@@ -80,23 +80,6 @@ if (window.location.href === 'https://my-mc.link' || window.location.href === 'h
|
||||
}
|
||||
}
|
||||
|
||||
const tiltCards = document.querySelectorAll('.tilt-card');
|
||||
tiltCards.forEach(card => {
|
||||
card.addEventListener('mousemove', (e) => {
|
||||
const rect = card.getBoundingClientRect();
|
||||
const x = e.clientX - rect.left;
|
||||
const y = e.clientY - rect.top;
|
||||
const centerX = rect.width / 2;
|
||||
const centerY = rect.height / 2;
|
||||
const tiltX = (y - centerY) / 12;
|
||||
const tiltY = (centerX - x) / 12;
|
||||
card.style.transform = `perspective(1200px) rotateX(${tiltX}deg) rotateY(${tiltY}deg)`;
|
||||
});
|
||||
card.addEventListener('mouseleave', () => {
|
||||
card.style.transform = 'perspective(1200px) rotateX(0) rotateY(0)';
|
||||
});
|
||||
});
|
||||
|
||||
const buttons = document.querySelectorAll('.btn-minecraft');
|
||||
buttons.forEach(button => {
|
||||
button.addEventListener('mousemove', (e) => {
|
||||
|
Reference in New Issue
Block a user