File tree 4 files changed +51
-0
lines changed
4 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < title > Parallax Effect</ title >
5
+ < style type ="text/css ">
6
+ * {
7
+ padding : 0px ;
8
+ margin : 0px ;
9
+ box-sizing : border-box;
10
+ }
11
+ # bgbox1 {
12
+ background-image : url ('bg1.jpg' );
13
+ }
14
+ # bgbox2 {
15
+ background-image : url ('bg2.jpg' );
16
+ }
17
+ # bgbox3 {
18
+ background-image : url ('bg3.jpg' );
19
+ }
20
+ # bgbox1 , # bgbox2 , # bgbox3 {
21
+ width : 100% ;
22
+ height : 100vh ;
23
+ background-position : center;
24
+ background-size : cover;
25
+ background-attachment : fixed;
26
+ background-repeat : no-repeat;
27
+ }
28
+ </ style >
29
+ </ head >
30
+
31
+ < body >
32
+ < div id ="bgbox1 ">
33
+ </ div >
34
+
35
+ < center style ="background:#000; ">
36
+ < h2 style ="color:white; "> Scroll up and down to see Parallax Effect.</ h2 >
37
+ </ center >
38
+
39
+ < div id ="bgbox2 ">
40
+ < h1 > NO JAVASCRIPT</ h1 >
41
+ </ div >
42
+
43
+ < center style ="background:#fff; ">
44
+ < h2 style ="color:black; "> Scroll Down!</ h2 >
45
+ </ center >
46
+
47
+ < div id ="bgbox3 ">
48
+ < h1 > COOL EFFECT</ h1 >
49
+ </ div >
50
+ </ body >
51
+ </ html >
You can’t perform that action at this time.
0 commit comments