-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from jwanner83/fixing-scroll
Fixing scroll
- Loading branch information
Showing
7 changed files
with
145 additions
and
20 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,55 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Cursor Example - follow.js</title> | ||
|
||
<style> | ||
body, html { | ||
height: 100%; | ||
width: 100%; | ||
margin: 0; | ||
cursor: none; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.cursor { | ||
height: 20px; | ||
width: 20px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.cursor-inner { | ||
transition: 200ms; | ||
height: 20px; | ||
width: 20px; | ||
background: #AC0000; | ||
border-radius: 100%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="cursor" data-follow="1"> | ||
<div class="cursor-inner"></div> | ||
</div> | ||
|
||
<script src="../dist/follow.min.js" data-follow-auto></script> | ||
<script> | ||
document.addEventListener('mousedown', () => { | ||
document.querySelector('.cursor-inner').style.height = '10px'; | ||
document.querySelector('.cursor-inner').style.width = '10px'; | ||
}) | ||
|
||
document.addEventListener('mouseup', () => { | ||
document.querySelector('.cursor-inner').style.height = '20px'; | ||
document.querySelector('.cursor-inner').style.width = '20px'; | ||
}) | ||
</script> | ||
</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,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Scroll Example - follow.js</title> | ||
|
||
<style> | ||
body, html { | ||
height: 200%; | ||
width: 100%; | ||
margin: 0; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.item { | ||
transition: 100ms all linear 0s; | ||
position: absolute; | ||
height: 100px; | ||
width: 100px; | ||
top: 50%; | ||
background: black; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="item" data-follow="5"></div> | ||
|
||
<script src="../dist/follow.min.js" data-follow-auto></script> | ||
</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
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