Bonsoir,
Voici un code que j’ai trouvé pour effectuer un Zoom au survol de la photo, mais je n’arrive pas à le faire fonctionner et je ne vois pas ou se situe l’erreur.
Merci pour votre aide.
Salutations
Code HTML
Code CSS
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Document sans nom</title> </head> <body> <div class="thumb"> <a href="#"> <img src="../Animateurs1/Alain.JPG" alt="Animateurs1" /></a> </div> <div class="thumb"> <a href="#"> <img src="../Animateurs2/Andre.JPG" alt=" Animateurs2" /></a> </div> <div class="thumb"> <a href="#"> <img src="../Animateur3/Francoise.JPG" alt=" Animateurs3" /></a> </div> </body> </html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 /* CSS Document */ body { background-color:black; color:white; height:500px; } img {border:0} .thumb { width:300px; height:225px; margin:1px; float:left; background-color:#D3D3D3; display:block; } .thumb a { display:block; } .thumb a:hover { position:absolute; } body>.thumb a:hover { position:relative; } .thumb a img { margin:0; padding:0; width:300px; height:225px; } .thumb a:hover img { position:relative; left:0px; top:40px; width:400px; height:325px; }
Partager