Bonjour,
Je m'entraine au css et je ne voudrais remplir ma page avec 24 card et je n'y arrive pas, pouvez vous m'aider ?
Mon
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 <body> <div class="cards"> <div class="card red">Hover me</div> <div class="card blue">Hover me</div> <div class="card green">Hover me</div> </div> </body>
Mon 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
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
49
50
51
52
53
54
55
56 * { margin: 0; padding: 0; box-sizing: border-box; font-family: sans-serif; } body { display: flex; align-items: center; justify-content: center; height: 100vh; background-color: #000; } .cards { display: flex; flex-direction: column; gap: 15px; } .cards>.red { background-color: #f43f5e; } .cards>.blue { background-color: #3b82f6; } .cards>.green { background-color: #22c55e; } .cards>.card { display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; height: 100px; width: 250px; border-radius: 10px; color: #fff; font-size: 24px; cursor: pointer; transition: all 1s; } .cards>.card:hover { transform: scale(1.1, 1.1); } .cards:hover>.card:not(:hover) { filter: blur(10px); transform: scale(0.9, 0.9); }
Partager