Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add animation-range support for ScrollTimeline #153

Merged
merged 20 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions demo/scroll-timeline-css/anonymous-scroll-timeline-with-range.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE HTML>
<title>Anonymous Scroll Progress Timeline</title>

<style>
@keyframes move {
to { transform: translateX(350px) translateY(600px); }
}

#box_one {
width: 100px;
height: 100px;
background-color: green;
animation: move linear both;
animation-timeline: scroll(y nearest);
animation-range: 100px 500px;
}

.spacer {
width: 100%;
height: 2000px;
}

#container {
width: 500px;
height: 500px;
background-color:beige;
overflow: auto;
}

body {
height: 3000px;
}
</style>

<body>

<div id="container">
<div id="box_one"></div>
<div class="spacer"></div>
</div>

<script src="../../dist/scroll-timeline.js"></script>
</body>
224 changes: 0 additions & 224 deletions src/intersection-based-offset.js

This file was deleted.

Loading
Loading