-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
98 lines (89 loc) · 2.24 KB
/
styles.css
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
@font-face {
font-family: myFirstFont;
src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@200&display=swap');
}
#wrapper{
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
perspective: 10px; /* 3D me game chalane ke liye */
}
.container{
position: relative; /* // kyuki foreground background ki img ko overlap krwana hai to unki position absolute rkhenge isliye nearest ancestor ki position ko relative rkhre hai */
display: flex; /* item ko center align krne ke liye */
align-items: center;
height: 100%;
justify-content: center;
transform-style: preserve-3d; /*otherwise both pictures will stick to each other*/
z-index: -1; /*layering */
}
.background{
transform: translateZ(-40px) scale(5);
}
.foreground{
transform: translateZ(-20px) scale(3);
}
.background, .foreground{
position: absolute;
height: 100%;
width: 100%;
z-index: -1;
object-fit: cover;
}
h1{
position: absolute;
top:8rem;
font-size:5rem;
letter-spacing:.5px;
color:black;
text-shadow:0 0 8px rgba(0,0,0,0.3);
font-family: myFirstFont;
}
section{
background-color: rgb(45,45,45);
color:white;
padding:5rem 0;
}
.secHeading{
font-size:4rem;
padding:0 10rem;
}
.text{
font-size:1.5rem;
padding: 0 10rem;
margin: 5rem 0;
}
.bg{
position:relative;
width:100%;
background-attachment: fixed; /*suring wali images fixed rhengi aur uske upr text scroll krega */
background-position: center; /* image ko center me krne ke liye */
background-size: cover; /*object ko uski jgh pe laane ke liye */
height:500px;
}
.desc{
position: absolute;
background-color: white;
padding: 0.5rem 1rem;
top:50%;
left:35%;
transform: translateX(-50%) translateY(-50%);
color:black;
font-size:3rem;
font-weight:600;
font-family: myFirstFont;
}
.bg1{
background-image: url(sport-1.jpg);
}
.bg2{
background-image: url(sport-2.jpg);
}
.bg3{
background-image: url(sport-3.jpg);
}