Skip to content

Commit bbf228c

Browse files
adding php prj here
1 parent 8c8bc18 commit bbf228c

34 files changed

+1014
-387
lines changed
File renamed without changes.
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
<!DOCTYPE html>
2-
<html lang="en" dir="ltr">
3-
<head>
4-
<meta charset="utf-8">
5-
<title>vanila.js background scrolling effect</title>
6-
<link rel="stylesheet" href="style.css">
7-
8-
</head>
9-
<body>
10-
<section>
11-
<img src="static/bg.jpg" alt="bg" id="bg">
12-
<img src="static/moon.png" alt="moon" id="moon">
13-
<img src="static/mountain.png" alt="mountain" id="mountain">
14-
<img src="static/road.png" alt="road" id="road">
15-
<h2 id="text"><u>Moon Light Heaven</u></h2>
16-
</section>
17-
<script type="text/javascript">
18-
let bg=document.getElementById("bg");
19-
let moon=document.getElementById("moon");
20-
let mountain=document.getElementById("mountain");
21-
let road=document.getElementById("road");
22-
let text=document.getElementById("text");
23-
24-
25-
window.addEventListener('scroll',function(){
26-
var value=window.scrollY;
27-
bg.style.top=value*0.5+"px";
28-
moon.style.left= -value*1+"px";
29-
mountain.style.top=-value*0.15+"px";
30-
road.style.top=value*0.15+"px";
31-
text.style.top=value*1+"px";
32-
})
33-
</script>
34-
</body>
35-
</html>
1+
<!DOCTYPE html>
2+
<html lang="en" dir="ltr">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>vanila.js background scrolling effect</title>
6+
<link rel="stylesheet" href="style.css">
7+
8+
</head>
9+
<body>
10+
<section>
11+
<img src="static/bg.jpg" alt="bg" id="bg">
12+
<img src="static/moon.png" alt="moon" id="moon">
13+
<img src="static/mountain.png" alt="mountain" id="mountain">
14+
<img src="static/road.png" alt="road" id="road">
15+
<h2 id="text"><u>Moon Light Heaven</u></h2>
16+
</section>
17+
<script type="text/javascript">
18+
let bg=document.getElementById("bg");
19+
let moon=document.getElementById("moon");
20+
let mountain=document.getElementById("mountain");
21+
let road=document.getElementById("road");
22+
let text=document.getElementById("text");
23+
24+
25+
window.addEventListener('scroll',function(){
26+
var value=window.scrollY;
27+
bg.style.top=value*0.5+"px";
28+
moon.style.left= -value*1+"px";
29+
mountain.style.top=-value*0.15+"px";
30+
road.style.top=value*0.15+"px";
31+
text.style.top=value*1+"px";
32+
})
33+
</script>
34+
</body>
35+
</html>
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
<!DOCTYPE html>
2-
<html lang="en" dir="ltr">
3-
<head>
4-
<meta charset="utf-8">
5-
<title>vanila.js background scrolling effect</title>
6-
<link rel="stylesheet" href="style.css">
7-
8-
</head>
9-
<body>
10-
<section>
11-
<img src="static/bg1.png" alt="bg" id="bg">
12-
<img src="static/moon.png" alt="moon" id="moon">
13-
<img src="static/mountain1.png" alt="mountain" id="mountain">
14-
<img src="static/road1.png" alt="road" id="road">
15-
<h2 id="text"><u>Tirtharaj sinha</u></h2>
16-
</section>
17-
<script type="text/javascript">
18-
let bg=document.getElementById("bg");
19-
let moon=document.getElementById("moon");
20-
let mountain=document.getElementById("mountain");
21-
let road=document.getElementById("road");
22-
let text=document.getElementById("text");
23-
24-
25-
window.addEventListener('scroll',function(){
26-
var value=window.scrollY;
27-
bg.style.top=value*0.5+"px";
28-
moon.style.left= -value*1+"px";
29-
mountain.style.top=-value*0.15+"px";
30-
road.style.top=-value*0.1+"px";
31-
text.style.top=value*1+"px";
32-
})
33-
</script>
34-
</body>
35-
</html>
1+
<!DOCTYPE html>
2+
<html lang="en" dir="ltr">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>vanila.js background scrolling effect</title>
6+
<link rel="stylesheet" href="style.css">
7+
8+
</head>
9+
<body>
10+
<section>
11+
<img src="static/bg1.png" alt="bg" id="bg">
12+
<img src="static/moon.png" alt="moon" id="moon">
13+
<img src="static/mountain1.png" alt="mountain" id="mountain">
14+
<img src="static/road1.png" alt="road" id="road">
15+
<h2 id="text"><u>Tirtharaj sinha</u></h2>
16+
</section>
17+
<script type="text/javascript">
18+
let bg=document.getElementById("bg");
19+
let moon=document.getElementById("moon");
20+
let mountain=document.getElementById("mountain");
21+
let road=document.getElementById("road");
22+
let text=document.getElementById("text");
23+
24+
25+
window.addEventListener('scroll',function(){
26+
var value=window.scrollY;
27+
bg.style.top=value*0.5+"px";
28+
moon.style.left= -value*1+"px";
29+
mountain.style.top=-value*0.15+"px";
30+
road.style.top=-value*0.1+"px";
31+
text.style.top=value*1+"px";
32+
})
33+
</script>
34+
</body>
35+
</html>

0 commit comments

Comments
 (0)