Bonjour,

Est il possible de personnaliser la methode hover à une classe, ou cela ne marche qu'avec un objet?

Voici le code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
<div id="boxHandle1" class="box">
</div>
<div id="boxHandle2" class="box">
</div>
<div id="boxHandle3" class="box">
</div>
<div id="boxHandle4" class="box">
</div>
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
 
.box {
	border-top: 1px dotted Gray;
	border-left: 1px dotted Gray;
	margin: 5px;
	padding: 0px;
	background: transparent none repeat scroll 0% 50%;
	-moz-background-clip: initial;
	-moz-background-origin: initial;
	-moz-background-inline-policy: initial;
	width: 250px;
	height: 123px;
	z-index: 1;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
	top: auto;
}
1è solution:
Puis-je faire ca?:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
 
.box:hover {
  	 display: block;
    border: 1px dotted rgb(223, 88, 0);
    background: transparent none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    width: 250px;
    height: 123px;
    }
2è solution:
Ou je suis obligé de faire ca?:
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
 
#boxHandle1:hover {
  	 display: block;
    border: 1px dotted rgb(223, 88, 0);
    background: transparent none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    width: 250px;
    height: 123px;
    }
#boxHandle2:hover {
  	 display: block;
    border: 1px dotted rgb(223, 88, 0);
    background: transparent none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    width: 250px;
    height: 123px;
    }
#boxHandle3:hover {
  	 display: block;
    border: 1px dotted rgb(223, 88, 0);
    background: transparent none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    width: 250px;
    height: 123px;
    }
#boxHandle4:hover {
  	 display: block;
    border: 1px dotted rgb(223, 88, 0);
    background: transparent none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    width: 250px;
    height: 123px;
    }
Autrement dis, comment faire si la 1ère solution ne marche pas?
Merci d'avance.