-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into gloweffect
- Loading branch information
Showing
10 changed files
with
298 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const boxes = document.querySelectorAll(".box"); | ||
const revelFunction = () => { | ||
console.log(window.screen.availHeight); | ||
var fixHeight = window.screen.availHeight; | ||
fixHeight > 700 ? (fixHeight -= 200) : (fixHeight += 250); | ||
boxes.forEach((Element) => { | ||
const box = Element.getBoundingClientRect(); | ||
if (box.top < fixHeight) { | ||
Element.classList.add("revel"); | ||
} else { | ||
Element.classList.remove("revel"); | ||
} | ||
}); | ||
}; | ||
window.addEventListener("scroll", revelFunction); | ||
|
||
revelFunction(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link rel="stylesheet" href="./style.css" /> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Scroll Animation</title> | ||
</head> | ||
<body> | ||
<h1>Scroll Animation</h1> | ||
<h3>Scroll Page to see the magic</h3> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥰</div> | ||
<div class="box">😝</div> | ||
<div class="box">🤩</div> | ||
<div class="box">🤪</div> | ||
<div class="box">😇</div> | ||
<div class="box">🤓</div> | ||
<div class="box">🤗</div> | ||
<div class="box">🤫</div> | ||
<div class="box">😍</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥰</div> | ||
<div class="box">😝</div> | ||
<div class="box">🤩</div> | ||
<div class="box">🤪</div> | ||
<div class="box">😇</div> | ||
<div class="box">🤓</div> | ||
<div class="box">🤗</div> | ||
<div class="box">🤫</div> | ||
<div class="box">😍</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥰</div> | ||
<div class="box">😝</div> | ||
<div class="box">🤩</div> | ||
<div class="box">🤪</div> | ||
<div class="box">😇</div> | ||
<div class="box">🤓</div> | ||
<div class="box">🤗</div> | ||
<div class="box">🤫</div> | ||
<div class="box">😍</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥰</div> | ||
<div class="box">😝</div> | ||
<div class="box">🤩</div> | ||
<div class="box">🤪</div> | ||
<div class="box">😇</div> | ||
<div class="box">🤓</div> | ||
<div class="box">🤗</div> | ||
<div class="box">🤫</div> | ||
<div class="box">😍</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
<div class="box">🥰</div> | ||
<div class="box">😝</div> | ||
<div class="box">🤩</div> | ||
<div class="box">🤪</div> | ||
<div class="box">😇</div> | ||
<div class="box">🤓</div> | ||
<div class="box">🤗</div> | ||
<div class="box">🤫</div> | ||
<div class="box">😍</div> | ||
<div class="box">🥳</div> | ||
<div class="box">😃</div> | ||
<div class="box">😎</div> | ||
</body> | ||
<footer> | ||
<div>Credit: <a href="https://github.com/pulkit-30">PULKIT GUPTA</a></div> | ||
<div>Date: 1 /08/ 2020</div> | ||
</footer> | ||
<script src="./Script.js"></script> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Scroll Animation | ||
|
||
<img src="./pro.png"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
body { | ||
font-family: sans-serif; | ||
text-align: center; | ||
color: white; | ||
background-color: #4a403a; | ||
width: 100vw; | ||
overflow-x: hidden !important; | ||
overflow-y: auto; | ||
} | ||
.box { | ||
overflow: hidden; | ||
width: fit-content; | ||
height: fit-content; | ||
text-align: center; | ||
font-size: 5rem; | ||
margin: 5rem auto; | ||
opacity: 0; | ||
transform: translateX(-100vw); | ||
-webkit-transform: translateX(-100vw); | ||
-moz-transform: translateX(-100vw); | ||
-ms-transform: translateX(-100vw); | ||
-o-transform: translateX(-100vw); | ||
transition: 0.3s; | ||
-webkit-transition: 0.3s; | ||
-moz-transition: 0.3s; | ||
-ms-transition: 0.3s; | ||
-o-transition: 0.3s; | ||
-webkit-box-reflect: below -20px linear-gradient(transparent, transparent, rgba(255, 255, 255, 0.363)); | ||
} | ||
.box:nth-child(even) { | ||
transform: translateX(100vw); | ||
-webkit-transform: translateX(100vw); | ||
-moz-transform: translateX(100vw); | ||
-ms-transform: translateX(100vw); | ||
-o-transform: translateX(100vw); | ||
} | ||
.revel { | ||
opacity: 1; | ||
transform: translateX(0) !important; | ||
-webkit-transform: translateX(0) !important; | ||
-moz-transform: translateX(0) !important; | ||
-ms-transform: translateX(0) !important; | ||
-o-transform: translateX(0) !important; | ||
} | ||
@media (max-width: 800px) { | ||
html { | ||
overflow-x: hidden; | ||
} | ||
} | ||
footer { | ||
position: absolute; | ||
bottom: 5px; | ||
left: 5px; | ||
color: white; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Shiny Button Hover Effect</title> | ||
<link rel="stylesheet" href="style.css" /> | ||
</head> | ||
<body> | ||
<a href="#">Shiny Button</a> | ||
<a href="#">Shiny Button</a> | ||
<footer> | ||
<div> | ||
<p> | ||
Credit :- | ||
<a href="https://github.com/Lavish-Bansal" target="/" class="atag" | ||
>Lavish Bansal</a | ||
> | ||
</p> | ||
</div> | ||
<div class="date">Date :- 05-09-2021</div> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Shiny Button Hover Effect | ||
<img src="image.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
font-family: consoles; | ||
} | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
min-height: 100vh; | ||
align-items: center; | ||
flex-direction: column; | ||
background: #19011d; | ||
} | ||
a { | ||
position: relative; | ||
padding: 15px 30px; | ||
margin: 10px; | ||
background: #35003d; | ||
color: #fff; | ||
text-decoration: none; | ||
letter-spacing: 1px; | ||
border: 1px solid #000; | ||
transition: 0.5s; | ||
overflow: hidden; | ||
} | ||
a:hover { | ||
background: #a41ee9; | ||
} | ||
a:nth-child(2):hover { | ||
background: #ff3c7f; | ||
} | ||
a::before { | ||
content: ""; | ||
position: absolute; | ||
top: 0; | ||
left: -100%; | ||
width: 100%; | ||
height: 100%; | ||
background: linear-gradient(90deg, transparent, #fff, transparent); | ||
transition: 0.5s; | ||
} | ||
a:hover::before { | ||
left: 100%; | ||
} | ||
footer { | ||
background: none !important; | ||
position: absolute; | ||
color: yellow; | ||
bottom: 1rem; | ||
left: 5rem; | ||
} | ||
footer a { | ||
background: none; | ||
} | ||
footer a::before { | ||
background: none; | ||
} | ||
footer a:hover { | ||
background: none; | ||
} |