File tree 3 files changed +123
-0
lines changed
3 files changed +123
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 " />
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
7
+ < title > Expand's card</ title >
8
+ < link rel ="stylesheet " href ="style.css " />
9
+ < script src ="script.js " defer > </ script >
10
+ </ head >
11
+ < body >
12
+ < div class ="container ">
13
+ < div
14
+ class ="panel active "
15
+ style ="
16
+ background-image: url(https://images6.alphacoders.com/656/thumb-1920-656029.png);
17
+ "
18
+ >
19
+ < h3 > Anime x sliders</ h3 >
20
+ </ div >
21
+
22
+ < div
23
+ class ="panel "
24
+ style ="
25
+ background-image: url(https://images.alphacoders.com/103/thumb-1920-1032111.png);
26
+ "
27
+ >
28
+ < h3 > Kamado Tanjiro</ h3 >
29
+ </ div >
30
+
31
+ < div
32
+ class ="panel "
33
+ style ="
34
+ background-image: url(https://images6.alphacoders.com/112/thumb-1920-1128080.jpg);
35
+ "
36
+ >
37
+ < h3 > Mushoku Tensei</ h3 >
38
+ </ div >
39
+
40
+ < div
41
+ class ="panel "
42
+ style ="
43
+ background-image: url(https://images7.alphacoders.com/403/thumb-1920-403509.jpg);
44
+ "
45
+ >
46
+ < h3 > Dragon Ball Z</ h3 >
47
+ </ div >
48
+
49
+ < div
50
+ class ="panel "
51
+ style ="
52
+ background-image: url(https://images2.alphacoders.com/718/thumb-1920-71840.jpg);
53
+ "
54
+ >
55
+ < h3 > Naruto</ h3 >
56
+ </ div >
57
+ </ div >
58
+ </ body >
59
+ </ html >
Original file line number Diff line number Diff line change
1
+ @import url ("https://fonts.googleapis.com/css2?family=Muli&display=swap" );
2
+
3
+ * {
4
+ box-sizing : border-box;
5
+ }
6
+
7
+ body {
8
+ margin : 0 ;
9
+ display : flex;
10
+ align-items : center;
11
+ justify-content : center;
12
+ height : 100vh ;
13
+ overflow : hidden;
14
+ font-family : "Muli" , sans-serif;
15
+ }
16
+
17
+ .container {
18
+ display : flex;
19
+ width : 90vw ;
20
+ }
21
+
22
+ .panel {
23
+ background-size : cover;
24
+ background-repeat : no-repeat;
25
+ background-position : center;
26
+ height : 80vh ;
27
+ border-radius : 50px ;
28
+ cursor : pointer;
29
+ color : # fff ;
30
+ flex : 0.5 ;
31
+ margin : 10px ;
32
+ position : relative;
33
+ transition : flex 0.7s ease-in;
34
+ }
35
+
36
+ .panel h3 {
37
+ font-size : 24px ;
38
+ position : absolute;
39
+ bottom : 20px ;
40
+ left : 20px ;
41
+ margin : 0 ;
42
+ opacity : 0 ;
43
+ }
44
+
45
+ .panel .active {
46
+ flex : 5 ;
47
+ }
48
+
49
+ .panel .active h3 {
50
+ font-weight : bold;
51
+ opacity : 1 ;
52
+ transition : opacity 0.3 ease-in-out 0.4s ;
53
+ }
54
+
55
+ @media (max-width : 480px ) {
56
+ .container {
57
+ width : 100vw ;
58
+ }
59
+
60
+ .panel : nth-of-type (4 ),
61
+ .panel : nth-of-type (5 ) {
62
+ display : flex;
63
+ }
64
+ }
You can’t perform that action at this time.
0 commit comments