-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathlu.html
48 lines (43 loc) · 1.51 KB
/
lu.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Imagem Interativa</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #1f9639;
background-image: url('file:///home/luisa/Downloads/David-Bernie-Print-Free-Palestine-Palestinian-Poppy-I.jpg');
background-size: cover; /* Ajusta a imagem para cobrir toda a área */
background-position: center; /* Centraliza a imagem */
background-repeat: no-repeat; /* Evita que a imagem se repita */
}
.imagem {
width: 200px;
transition: transform 0.3s, left 0.3s, top 0.3s;
position: relative;
}
.imagem:hover {
transform: scale(1.5);
}
</style>
</head>
<body>
<img src="file:///home/luisa/Downloads/palestinalivre.jpg" alt="Imagem Interativa" class="imagem" id="imagem">
<script>
const imagem = document.getElementById('imagem');
document.addEventListener('mousemove', (event) => {
const x = event.clientX;
const y = event.clientY;
// Move a imagem levemente com base na posição do mouse
imagem.style.left = `${x * 0.05}px`;
imagem.style.top = `${y * 0.05}px`;
});
</script>
</body>
</html>