Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <main>
	<div id="list-view">
		<ul>
			<li id="list-item-1">
				<span class="avatar"></span>
				<span class="name">Wilfrid Wolfgang</span>
			</li>
			<li id="list-item-2">
				<span class="avatar"></span>
				<span class="name">Mathias Bristol</span>
			</li>
			<li id="list-item-3">
				<span class="avatar"></span>
				<span class="name">Tristin Bentley</span>
			</li>
			<li id="list-item-4">
				<span class="avatar"></span>
				<span class="name">Edgar Roger</span>
			</li>
			<li id="list-item-5">
				<span class="avatar"></span>
				<span class="name">Alois Ilya</span>
			</li>
			<li id="list-item-6">
				<span class="avatar"></span>
				<span class="name">Gunter Darden</span>
			</li>
			<li id="list-item-7">
				<span class="avatar"></span>
				<span class="name">Dwayne Thorben</span>
			</li>
			<li id="list-item-8">
				<span class="avatar"></span>
				<span class="name">Waylon Thierry</span>
			</li>
			<li id="list-item-9">
				<span class="avatar"></span>
				<span class="name">Wilfrid Wolfgang</span>
			</li>
			<li id="list-item-10">
				<span class="avatar"></span>
				<span class="name">Mathias Bristol</span>
			</li>
			<li id="list-item-11">
				<span class="avatar"></span>
				<span class="name">Tristin Bentley</span>
			</li>
			<li id="list-item-12">
				<span class="avatar"></span>
				<span class="name">Edgar Roger</span>
			</li>
			<li id="list-item-13">
				<span class="avatar"></span>
				<span class="name">Alois Ilya</span>
			</li>
			<li id="list-item-14">
				<span class="avatar"></span>
				<span class="name">Gunter Darden</span>
			</li>
			<li id="list-item-15">
				<span class="avatar"></span>
				<span class="name">Dwayne Thorben</span>
			</li>
			<li id="list-item-16">
				<span class="avatar"></span>
				<span class="name">Waylon Thierry</span>
			</li>
			<li id="list-item-17">
				<span class="avatar"></span>
				<span class="name">Wilfrid Wolfgang</span>
			</li>
			<li id="list-item-18">
				<span class="avatar"></span>
				<span class="name">Mathias Bristol</span>
			</li>
			<li id="list-item-19">
				<span class="avatar"></span>
				<span class="name">Tristin Bentley</span>
			</li>
			<li id="list-item-20">
				<span class="avatar"></span>
				<span class="name">Edgar Roger</span>
			</li>
			<li id="list-item-21">
				<span class="avatar"></span>
				<span class="name">Alois Ilya</span>
			</li>
			<li id="list-item-22">
				<span class="avatar"></span>
				<span class="name">Gunter Darden</span>
			</li>
			<li id="list-item-23">
				<span class="avatar"></span>
				<span class="name">Dwayne Thorben</span>
			</li>
			<li id="list-item-24">
				<span class="avatar"></span>
				<span class="name">Waylon Thierry</span>
			</li>
		</ul>
	</div>
</main>


<div class="warning">
	<p>⚠️ Your browser does not support CSS Scroll-Linked Animations, so this demo won't work.<br />If you're feeling adventurous use Chrome 89 with “Experimental Web Platform Features” enabled. Alternatively you can <a href="https://twitter.com/bramus/status/1365055518914600968" target="_top">check out a recording of this demo</a>.</p>
</div>
              
            
!

CSS

              
                @supports (animation-timeline: works) {
	.warning {
		display: none;
	}

	@keyframes li-appear {
		from {
			opacity: 0;
			transform: translateY(100%);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	@keyframes li-disappear {
		from {
			opacity: 1;
			transform: translateY(0);
		}
		to {
			opacity: 0;
			transform: translateY(-100%);
		}
	}

	/* Create a scroll timeline for each element, and attach it */
	/* I know this code is getting repetitive, that's why I filed a bug at the spec: https://github.com/w3c/csswg-drafts/issues/5884 */
    @scroll-timeline tl-list-item-1-disappear {
        source: selector(#list-view);
        start: selector(#list-item-1) start 1;
        end: selector(#list-item-1) start 0;
        scroll-offsets:
            selector(#list-item-1) start 1,
            selector(#list-item-1) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-1-appear {
        source: selector(#list-view);
        start: selector(#list-item-1) end 0;
        end: selector(#list-item-1) end 1;
        scroll-offsets:
            selector(#list-item-1) end 0,
            selector(#list-item-1) end 1
        ;
        time-range: 1s;
    }

    #list-item-1 > * {
        animation:
            1s li-appear linear tl-list-item-1-appear,
            1s li-disappear linear tl-list-item-1-disappear;
    }		


    @scroll-timeline tl-list-item-2-disappear {
        source: selector(#list-view);
        start: selector(#list-item-2) start 1;
        end: selector(#list-item-2) start 0;
        scroll-offsets:
            selector(#list-item-2) start 1,
            selector(#list-item-2) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-2-appear {
        source: selector(#list-view);
        start: selector(#list-item-2) end 0;
        end: selector(#list-item-2) end 1;
        scroll-offsets:
            selector(#list-item-2) end 0,
            selector(#list-item-2) end 1
        ;
        time-range: 1s;
    }

    #list-item-2 > * {
        animation:
            1s li-appear linear tl-list-item-2-appear,
            1s li-disappear linear tl-list-item-2-disappear;
    }		


    @scroll-timeline tl-list-item-3-disappear {
        source: selector(#list-view);
        start: selector(#list-item-3) start 1;
        end: selector(#list-item-3) start 0;
        scroll-offsets:
            selector(#list-item-3) start 1,
            selector(#list-item-3) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-3-appear {
        source: selector(#list-view);
        start: selector(#list-item-3) end 0;
        end: selector(#list-item-3) end 1;
        scroll-offsets:
            selector(#list-item-3) end 0,
            selector(#list-item-3) end 1
        ;
        time-range: 1s;
    }

    #list-item-3 > * {
        animation:
            1s li-appear linear tl-list-item-3-appear,
            1s li-disappear linear tl-list-item-3-disappear;
    }		


    @scroll-timeline tl-list-item-4-disappear {
        source: selector(#list-view);
        start: selector(#list-item-4) start 1;
        end: selector(#list-item-4) start 0;
        scroll-offsets:
            selector(#list-item-4) start 1,
            selector(#list-item-4) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-4-appear {
        source: selector(#list-view);
        start: selector(#list-item-4) end 0;
        end: selector(#list-item-4) end 1;
        scroll-offsets:
            selector(#list-item-4) end 0,
            selector(#list-item-4) end 1
        ;
        time-range: 1s;
    }

    #list-item-4 > * {
        animation:
            1s li-appear linear tl-list-item-4-appear,
            1s li-disappear linear tl-list-item-4-disappear;
    }		


    @scroll-timeline tl-list-item-5-disappear {
        source: selector(#list-view);
        start: selector(#list-item-5) start 1;
        end: selector(#list-item-5) start 0;
        scroll-offsets:
            selector(#list-item-5) start 1,
            selector(#list-item-5) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-5-appear {
        source: selector(#list-view);
        start: selector(#list-item-5) end 0;
        end: selector(#list-item-5) end 1;
        scroll-offsets:
            selector(#list-item-5) end 0,
            selector(#list-item-5) end 1
        ;
        time-range: 1s;
    }

    #list-item-5 > * {
        animation:
            1s li-appear linear tl-list-item-5-appear,
            1s li-disappear linear tl-list-item-5-disappear;
    }		


    @scroll-timeline tl-list-item-6-disappear {
        source: selector(#list-view);
        start: selector(#list-item-6) start 1;
        end: selector(#list-item-6) start 0;
        scroll-offsets:
            selector(#list-item-6) start 1,
            selector(#list-item-6) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-6-appear {
        source: selector(#list-view);
        start: selector(#list-item-6) end 0;
        end: selector(#list-item-6) end 1;
        scroll-offsets:
            selector(#list-item-6) end 0,
            selector(#list-item-6) end 1
        ;
        time-range: 1s;
    }

    #list-item-6 > * {
        animation:
            1s li-appear linear tl-list-item-6-appear,
            1s li-disappear linear tl-list-item-6-disappear;
    }		


    @scroll-timeline tl-list-item-7-disappear {
        source: selector(#list-view);
        start: selector(#list-item-7) start 1;
        end: selector(#list-item-7) start 0;
        scroll-offsets:
            selector(#list-item-7) start 1,
            selector(#list-item-7) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-7-appear {
        source: selector(#list-view);
        start: selector(#list-item-7) end 0;
        end: selector(#list-item-7) end 1;
        scroll-offsets:
            selector(#list-item-7) end 0,
            selector(#list-item-7) end 1
        ;
        time-range: 1s;
    }

    #list-item-7 > * {
        animation:
            1s li-appear linear tl-list-item-7-appear,
            1s li-disappear linear tl-list-item-7-disappear;
    }		


    @scroll-timeline tl-list-item-8-disappear {
        source: selector(#list-view);
        start: selector(#list-item-8) start 1;
        end: selector(#list-item-8) start 0;
        scroll-offsets:
            selector(#list-item-8) start 1,
            selector(#list-item-8) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-8-appear {
        source: selector(#list-view);
        start: selector(#list-item-8) end 0;
        end: selector(#list-item-8) end 1;
        scroll-offsets:
            selector(#list-item-8) end 0,
            selector(#list-item-8) end 1
        ;
        time-range: 1s;
    }

    #list-item-8 > * {
        animation:
            1s li-appear linear tl-list-item-8-appear,
            1s li-disappear linear tl-list-item-8-disappear;
    }		


    @scroll-timeline tl-list-item-9-disappear {
        source: selector(#list-view);
        start: selector(#list-item-9) start 1;
        end: selector(#list-item-9) start 0;
        scroll-offsets:
            selector(#list-item-9) start 1,
            selector(#list-item-9) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-9-appear {
        source: selector(#list-view);
        start: selector(#list-item-9) end 0;
        end: selector(#list-item-9) end 1;
        scroll-offsets:
            selector(#list-item-9) end 0,
            selector(#list-item-9) end 1
        ;
        time-range: 1s;
    }

    #list-item-9 > * {
        animation:
            1s li-appear linear tl-list-item-9-appear,
            1s li-disappear linear tl-list-item-9-disappear;
    }		


    @scroll-timeline tl-list-item-10-disappear {
        source: selector(#list-view);
        start: selector(#list-item-10) start 1;
        end: selector(#list-item-10) start 0;
        scroll-offsets:
            selector(#list-item-10) start 1,
            selector(#list-item-10) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-10-appear {
        source: selector(#list-view);
        start: selector(#list-item-10) end 0;
        end: selector(#list-item-10) end 1;
        scroll-offsets:
            selector(#list-item-10) end 0,
            selector(#list-item-10) end 1
        ;
        time-range: 1s;
    }

    #list-item-10 > * {
        animation:
            1s li-appear linear tl-list-item-10-appear,
            1s li-disappear linear tl-list-item-10-disappear;
    }		


    @scroll-timeline tl-list-item-11-disappear {
        source: selector(#list-view);
        start: selector(#list-item-11) start 1;
        end: selector(#list-item-11) start 0;
        scroll-offsets:
            selector(#list-item-11) start 1,
            selector(#list-item-11) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-11-appear {
        source: selector(#list-view);
        start: selector(#list-item-11) end 0;
        end: selector(#list-item-11) end 1;
        scroll-offsets:
            selector(#list-item-11) end 0,
            selector(#list-item-11) end 1
        ;
        time-range: 1s;
    }

    #list-item-11 > * {
        animation:
            1s li-appear linear tl-list-item-11-appear,
            1s li-disappear linear tl-list-item-11-disappear;
    }		


    @scroll-timeline tl-list-item-12-disappear {
        source: selector(#list-view);
        start: selector(#list-item-12) start 1;
        end: selector(#list-item-12) start 0;
        scroll-offsets:
            selector(#list-item-12) start 1,
            selector(#list-item-12) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-12-appear {
        source: selector(#list-view);
        start: selector(#list-item-12) end 0;
        end: selector(#list-item-12) end 1;
        scroll-offsets:
            selector(#list-item-12) end 0,
            selector(#list-item-12) end 1
        ;
        time-range: 1s;
    }

    #list-item-12 > * {
        animation:
            1s li-appear linear tl-list-item-12-appear,
            1s li-disappear linear tl-list-item-12-disappear;
    }		


    @scroll-timeline tl-list-item-13-disappear {
        source: selector(#list-view);
        start: selector(#list-item-13) start 1;
        end: selector(#list-item-13) start 0;
        scroll-offsets:
            selector(#list-item-13) start 1,
            selector(#list-item-13) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-13-appear {
        source: selector(#list-view);
        start: selector(#list-item-13) end 0;
        end: selector(#list-item-13) end 1;
        scroll-offsets:
            selector(#list-item-13) end 0,
            selector(#list-item-13) end 1
        ;
        time-range: 1s;
    }

    #list-item-13 > * {
        animation:
            1s li-appear linear tl-list-item-13-appear,
            1s li-disappear linear tl-list-item-13-disappear;
    }		


    @scroll-timeline tl-list-item-14-disappear {
        source: selector(#list-view);
        start: selector(#list-item-14) start 1;
        end: selector(#list-item-14) start 0;
        scroll-offsets:
            selector(#list-item-14) start 1,
            selector(#list-item-14) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-14-appear {
        source: selector(#list-view);
        start: selector(#list-item-14) end 0;
        end: selector(#list-item-14) end 1;
        scroll-offsets:
            selector(#list-item-14) end 0,
            selector(#list-item-14) end 1
        ;
        time-range: 1s;
    }

    #list-item-14 > * {
        animation:
            1s li-appear linear tl-list-item-14-appear,
            1s li-disappear linear tl-list-item-14-disappear;
    }		


    @scroll-timeline tl-list-item-15-disappear {
        source: selector(#list-view);
        start: selector(#list-item-15) start 1;
        end: selector(#list-item-15) start 0;
        scroll-offsets:
            selector(#list-item-15) start 1,
            selector(#list-item-15) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-15-appear {
        source: selector(#list-view);
        start: selector(#list-item-15) end 0;
        end: selector(#list-item-15) end 1;
        scroll-offsets:
            selector(#list-item-15) end 0,
            selector(#list-item-15) end 1
        ;
        time-range: 1s;
    }

    #list-item-15 > * {
        animation:
            1s li-appear linear tl-list-item-15-appear,
            1s li-disappear linear tl-list-item-15-disappear;
    }		


    @scroll-timeline tl-list-item-16-disappear {
        source: selector(#list-view);
        start: selector(#list-item-16) start 1;
        end: selector(#list-item-16) start 0;
        scroll-offsets:
            selector(#list-item-16) start 1,
            selector(#list-item-16) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-16-appear {
        source: selector(#list-view);
        start: selector(#list-item-16) end 0;
        end: selector(#list-item-16) end 1;
        scroll-offsets:
            selector(#list-item-16) end 0,
            selector(#list-item-16) end 1
        ;
        time-range: 1s;
    }

    #list-item-16 > * {
        animation:
            1s li-appear linear tl-list-item-16-appear,
            1s li-disappear linear tl-list-item-16-disappear;
    }		


    @scroll-timeline tl-list-item-17-disappear {
        source: selector(#list-view);
        start: selector(#list-item-17) start 1;
        end: selector(#list-item-17) start 0;
        scroll-offsets:
            selector(#list-item-17) start 1,
            selector(#list-item-17) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-17-appear {
        source: selector(#list-view);
        start: selector(#list-item-17) end 0;
        end: selector(#list-item-17) end 1;
        scroll-offsets:
            selector(#list-item-17) end 0,
            selector(#list-item-17) end 1
        ;
        time-range: 1s;
    }

    #list-item-17 > * {
        animation:
            1s li-appear linear tl-list-item-17-appear,
            1s li-disappear linear tl-list-item-17-disappear;
    }		


    @scroll-timeline tl-list-item-18-disappear {
        source: selector(#list-view);
        start: selector(#list-item-18) start 1;
        end: selector(#list-item-18) start 0;
        scroll-offsets:
            selector(#list-item-18) start 1,
            selector(#list-item-18) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-18-appear {
        source: selector(#list-view);
        start: selector(#list-item-18) end 0;
        end: selector(#list-item-18) end 1;
        scroll-offsets:
            selector(#list-item-18) end 0,
            selector(#list-item-18) end 1
        ;
        time-range: 1s;
    }

    #list-item-18 > * {
        animation:
            1s li-appear linear tl-list-item-18-appear,
            1s li-disappear linear tl-list-item-18-disappear;
    }		


    @scroll-timeline tl-list-item-19-disappear {
        source: selector(#list-view);
        start: selector(#list-item-19) start 1;
        end: selector(#list-item-19) start 0;
        scroll-offsets:
            selector(#list-item-19) start 1,
            selector(#list-item-19) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-19-appear {
        source: selector(#list-view);
        start: selector(#list-item-19) end 0;
        end: selector(#list-item-19) end 1;
        scroll-offsets:
            selector(#list-item-19) end 0,
            selector(#list-item-19) end 1
        ;
        time-range: 1s;
    }

    #list-item-19 > * {
        animation:
            1s li-appear linear tl-list-item-19-appear,
            1s li-disappear linear tl-list-item-19-disappear;
    }		


    @scroll-timeline tl-list-item-20-disappear {
        source: selector(#list-view);
        start: selector(#list-item-20) start 1;
        end: selector(#list-item-20) start 0;
        scroll-offsets:
            selector(#list-item-20) start 1,
            selector(#list-item-20) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-20-appear {
        source: selector(#list-view);
        start: selector(#list-item-20) end 0;
        end: selector(#list-item-20) end 1;
        scroll-offsets:
            selector(#list-item-20) end 0,
            selector(#list-item-20) end 1
        ;
        time-range: 1s;
    }

    #list-item-20 > * {
        animation:
            1s li-appear linear tl-list-item-20-appear,
            1s li-disappear linear tl-list-item-20-disappear;
    }		


    @scroll-timeline tl-list-item-21-disappear {
        source: selector(#list-view);
        start: selector(#list-item-21) start 1;
        end: selector(#list-item-21) start 0;
        scroll-offsets:
            selector(#list-item-21) start 1,
            selector(#list-item-21) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-21-appear {
        source: selector(#list-view);
        start: selector(#list-item-21) end 0;
        end: selector(#list-item-21) end 1;
        scroll-offsets:
            selector(#list-item-21) end 0,
            selector(#list-item-21) end 1
        ;
        time-range: 1s;
    }

    #list-item-21 > * {
        animation:
            1s li-appear linear tl-list-item-21-appear,
            1s li-disappear linear tl-list-item-21-disappear;
    }		


    @scroll-timeline tl-list-item-22-disappear {
        source: selector(#list-view);
        start: selector(#list-item-22) start 1;
        end: selector(#list-item-22) start 0;
        scroll-offsets:
            selector(#list-item-22) start 1,
            selector(#list-item-22) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-22-appear {
        source: selector(#list-view);
        start: selector(#list-item-22) end 0;
        end: selector(#list-item-22) end 1;
        scroll-offsets:
            selector(#list-item-22) end 0,
            selector(#list-item-22) end 1
        ;
        time-range: 1s;
    }

    #list-item-22 > * {
        animation:
            1s li-appear linear tl-list-item-22-appear,
            1s li-disappear linear tl-list-item-22-disappear;
    }		


    @scroll-timeline tl-list-item-23-disappear {
        source: selector(#list-view);
        start: selector(#list-item-23) start 1;
        end: selector(#list-item-23) start 0;
        scroll-offsets:
            selector(#list-item-23) start 1,
            selector(#list-item-23) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-23-appear {
        source: selector(#list-view);
        start: selector(#list-item-23) end 0;
        end: selector(#list-item-23) end 1;
        scroll-offsets:
            selector(#list-item-23) end 0,
            selector(#list-item-23) end 1
        ;
        time-range: 1s;
    }

    #list-item-23 > * {
        animation:
            1s li-appear linear tl-list-item-23-appear,
            1s li-disappear linear tl-list-item-23-disappear;
    }		


    @scroll-timeline tl-list-item-24-disappear {
        source: selector(#list-view);
        start: selector(#list-item-24) start 1;
        end: selector(#list-item-24) start 0;
        scroll-offsets:
            selector(#list-item-24) start 1,
            selector(#list-item-24) start 0
        ;
        time-range: 1s;
    }

    @scroll-timeline tl-list-item-24-appear {
        source: selector(#list-view);
        start: selector(#list-item-24) end 0;
        end: selector(#list-item-24) end 1;
        scroll-offsets:
            selector(#list-item-24) end 0,
            selector(#list-item-24) end 1
        ;
        time-range: 1s;
    }

    #list-item-24 > * {
        animation:
            1s li-appear linear tl-list-item-24-appear,
            1s li-disappear linear tl-list-item-24-disappear;
    }		
		
}

*,
*:before,
*:after {
	box-sizing: border-box;
}

body {
	font-family: "Helvetica", arial, sans-serif;
	background: #f9f9f9;
	margin: 0;
	padding: 0;
}

main {
	width: 20em;
	height: 80vh;
	margin: max(2.5em, 10vh) auto 0;
	background: #fff;
	border: 1px solid #ddd;
	position: relative;
}

main::before {
	content: "Scroll Me ⬇";
	position: absolute;
	width: 100%;
	text-align: center;
	transform: translateY(calc(-100% - 0.2em));
}

#list-view {
	height: 100%;
	overflow-y: scroll;
}

ul,
li {
	list-style: none;
	margin: 0;
	padding: 0;
}

ul {
	counter-reset: index;
}

li {
	height: 5em;
	border: none;
	border-bottom: 1px solid #ddd;
	counter-increment: index;
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 1em;
}

li:hover {
	background: #efefef;
	cursor: pointer;
}

li .name {
	flex: 1;
}

li .name::after {
	content: " (#list-item-" counter(index) ")";
	font-family: monospace;
	font-size: 0.8em;
}

.avatar {
	content: "";
	display: inline-block;
	vertical-align: middle;
	width: 2.5em;
	height: 2.5em;
	background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIzMnB4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMiAzMjsiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB3aWR0aD0iMzJweCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojNDM0MzQ1O3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9Cgkuc3Qxe2ZpbGw6IzQzNDM0NTt9Cjwvc3R5bGU+PGcgaWQ9IkxheWVyXzIiLz48ZyBpZD0iTGF5ZXJfMSI+PGc+PHBhdGggY2xhc3M9InN0MCIgZD0iTTMxLDE2YzAsNC42NTk5Ny0yLjEzLDguODI5OTYtNS40Njk5NywxMS41Nzk5NkMyMi45NCwyOS43MTk5NywxOS42MiwzMSwxNiwzMSAgICBzLTYuOTQtMS4yODAwMy05LjUzMDAzLTMuNDIwMDRDMy4xMywyNC44Mjk5NiwxLDIwLjY1OTk3LDEsMTZDMSw3LjcxOTk3LDcuNzE5OTcsMSwxNiwxUzMxLDcuNzE5OTcsMzEsMTZ6Ii8+PHBhdGggY2xhc3M9InN0MCIgZD0iTTIyLjUsMTEuNWMwLDIuNDUyNjMtMS4zNjA2Nyw1LjQwNzk5LTMuMzgwMDIsNy4wMjg2NWMtMC4wMzQ2NSwwLjAyNjAzLTAuMDY5MjksMC4wNTItMC4xMDM5OSwwLjA3ODAyICAgIGMtMC45MDEzMiwwLjcwMi0xLjkyMzk3LDEuMTI2NjYtMy4wMTU5OCwxLjEyNjY2cy0yLjExNDY3LTAuNDI0NjYtMy4wMTU5OC0xLjEyNjY2Yy0wLjAzNDctMC4wMjYwMy0wLjA2OTM1LTAuMDUyLTAuMTA0LTAuMDc4MDIgICAgQzEwLjg2MDY3LDE2LjkwNzk5LDkuNSwxMy45NTI2Myw5LjUsMTEuNUM5LjUsNy45MTE5OSwxMi40MTE5OSw1LDE2LDVTMjIuNSw3LjkxMTk5LDIyLjUsMTEuNXoiLz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjUuNTMwMDMsMjcuNTI5OTd2MC4wNDk5OUMyMi45NCwyOS43MTk5NywxOS42MiwzMSwxNiwzMXMtNi45NC0xLjI4MDAzLTkuNTMwMDMtMy40MjAwNHYtMC4wNDk5OSAgICBjMC00LjE2OTk4LDIuNjcwMDQtNy43MTk5Nyw2LjQxMDAzLTljMC4wMjk5NywwLjAyMDAyLDAuMDcwMDEsMC4wNDk5OSwwLjA5OTk4LDAuMDgwMDIgICAgYzAuOTEwMDMsMC43MDAwMSwxLjkyOTk5LDEuMTIsMy4wMjAwMiwxLjEyczIuMTA5OTktMC40MTk5OCwzLjAyMDAyLTEuMTJjMC4wMjk5Ny0wLjAzMDAzLDAuMDcwMDEtMC4wNiwwLjA5OTk4LTAuMDgwMDIgICAgQzIyLjg1OTk5LDE5LjgxLDI1LjUzMDAzLDIzLjM1OTk5LDI1LjUzMDAzLDI3LjUyOTk3eiIvPjwvZz48L2c+PC9zdmc+");
	background-size: 100%;
}

.warning,
.info {
	position: fixed;
	padding: 1em;
	border: 1px solid #ccc;
	z-index: 1;
	text-align: center;
	color: #000;
	line-height: 1.42;
}

.info {
	bottom: 1em;
	right: 1em;
	left: 1em;
	background: rgba(255 255 255 / 0.8);
}

.warning {
	top: 1em;
	right: 1em;
	left: 1em;
	background: rgba(255 255 205 / 0.8);
}

.warning > *,
.info > * {
	margin: 0;
	padding: 0;
}

.warning > * + *,
.info > * + * {
	margin-top: 1em;
}
              
            
!

JS

              
                // @note: This is a little helper to quickly generate a Scroll Timeline for each li.
// It not active, but left here for debugging purposes …
const generateCSS = () => {
	let css = '';
	document.querySelectorAll('li').forEach((li, i) => {
		const id = li.getAttribute('id');

		css = `
			${css}

			@scroll-timeline tl-${id}-disappear {
				source: selector(#list-view);
				start: selector(#${id}) start 1;
				end: selector(#${id}) start 0;
				scroll-offsets:
					selector(#${id}) start 1,
					selector(#${id}) start 0
				;
				time-range: 1s;
			}

			@scroll-timeline tl-${id}-appear {
				source: selector(#list-view);
				start: selector(#${id}) end 0;
				end: selector(#${id}) end 1;
				scroll-offsets:
					selector(#${id}) end 0,
					selector(#${id}) end 1
				;
				time-range: 1s;
			}

			#${id} > * {
				animation:
				  1s li-appear linear tl-${id}-appear,
				  1s li-disappear linear tl-${id}-disappear;
			}		
		`;
	});
	return css;
}

const injectCSS = (css) => {
	const style = document.createElement('style');
	style.innerHTML = css;
	document.head.appendChild(style);
}

// injectCSS(generateCSS());
              
            
!
999px

Console