File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-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 > Parallax Effect · Platzi Live</ title >
8
+ < style >
9
+ body {
10
+ margin : 0 ;
11
+ }
12
+ .parallax-container {
13
+ position : relative;
14
+ height : 100vh ;
15
+ overflow-x : hidden;
16
+ overflow-y : scroll;
17
+ perspective : 8px ;
18
+ }
19
+ .image {
20
+ position : absolute;
21
+ left : 0 ;
22
+ right : 0 ;
23
+ margin : 0 auto;
24
+ height : 100% ;
25
+ }
26
+ .image__background {
27
+ transform : translateZ (0px ) scale (1 );
28
+ }
29
+ .image__middle {
30
+ transform : translateZ (2px ) scale (0.75 );
31
+ }
32
+ .image__foreground {
33
+ transform : translateZ (5px ) scale (0.375 );
34
+ }
35
+ </ style >
36
+ </ head >
37
+ < body >
38
+ < div class ="parallax-container ">
39
+ < div class ="image image__background ">
40
+ < img src ="https://i.ibb.co/x7dMNxS/Background-1.png " alt ="">
41
+ </ div >
42
+ < div class ="image image__middle ">
43
+ < img src ="https://i.ibb.co/R3sbhx0/Middle.png " alt ="">
44
+ </ div >
45
+ < div class ="image image__foreground ">
46
+ < img src ="https://i.ibb.co/02hKVWF/Foreground.png " alt ="">
47
+ </ div >
48
+ </ div >
49
+ </ body >
50
+ </ html >
You can’t perform that action at this time.
0 commit comments