Loading video...

Video Failed to Load

Go Home

๐Ÿ“ Solved by CSS Scroll-Driven Animations: hide a header when scrolling down, show it again when scrolling up By adding a long transition-delay to a CSS property under certain conditions (with a Style Query), you can persist its value Demo by Fabrizio Calderan

15,624 views โ€ข 1 year ago โ€ขvia X (Twitter)

0 Comments

No comments available

Comments from the original post will appear here

Related Videos

you can create a sticky navbar that morphs when you scroll with pure CSS, no JS or animation libraries required ๐š‘๐šŽ๐šŠ๐š๐šŽ๐š› { ๐šŒ๐š˜๐š—๐š๐šŠ๐š’๐š—๐šŽ๐š›-๐š๐šข๐š™๐šŽ: ๐šœ๐šŒ๐š›๐š˜๐š•๐š•-๐šœ๐š๐šŠ๐š๐šŽ; ๐š™๐š˜๐šœ๐š’๐š๐š’๐š˜๐š—: ๐šœ๐š๐š’๐šŒ๐š”๐šข; ๐š๐š˜๐š™: ๐Ÿถ; } @๐šŒ๐š˜๐š—๐š๐šŠ๐š’๐š—๐šŽ๐š› ๐šœ๐šŒ๐š›๐š˜๐š•๐š•-๐šœ๐š๐šŠ๐š๐šŽ(๐šœ๐š๐šž๐šŒ๐š”: ๐š๐š˜๐š™) { .๐š—๐šŠ๐šŸ-๐š‹๐šŠ๐š› { ๐š–๐šŠ๐šก-๐š ๐š’๐š๐š๐š‘: ๐Ÿป๐Ÿผ๐š›๐šŽ๐š–; ๐š‹๐š˜๐š›๐š๐šŽ๐š›-๐š›๐šŠ๐š๐š’๐šž๐šœ: ๐Ÿถ.๐Ÿฝ๐Ÿป๐š›๐šŽ๐š–; ๐š‹๐šŠ๐šŒ๐š”๐š๐š›๐š˜๐šž๐š—๐š: ๐š›๐š๐š‹(๐Ÿธ๐Ÿป๐Ÿป ๐Ÿธ๐Ÿป๐Ÿป ๐Ÿธ๐Ÿป๐Ÿป / ๐Ÿถ.๐Ÿฟ๐Ÿธ); } } the browser now knows when a sticky element is stuck, all triggered by one container query available only in chromium browsers only, no firefox or safari which is a shame

Manu Arora

112,131 views โ€ข 1 month ago

004/100 Buttons. A bit of the process on building an animation. When looking at a finished animation or in this example a finished button, it can look quite complex inside the CSS. But when building it, itโ€™s more like a lot of simple steps, one after another. Here I had the idea to make some kind of text animation like the footer logo on the Osmo site. I try to add the base animation with no complex easing, for example transition: translate 0.4s ease. Starting with just moving the one text from bottom to top and the other text to top. Adding a stagger, play around with it. Searching for a way to make it more circular. On the research I found the sin() function inside CSS which can build a more smooth non linear curve for the stagger which creates this circular effect. And step by step adding more complexity like, different easing for hover/hover-out, opacity, 3D transform and more. I use also the sin() function to rotate the letters, so the middle ones are getting more rotated than the outer ones. Another thing which helps is to add a small delay on hover, for example 0.05s or 0.1s, you donโ€™t really see the difference, but when you hover pretty fast on and out it doesnโ€™t get that jumpy. Iโ€™m using here GSAPโ€™s SplitText to split every char into spans. And then Iโ€™m adding a CSS index variable to every span, starting from the center. SplitText can provide CSS index variables, but you cannot tell it from which direction. For the sin() itโ€™s also important to have a max length, so I add another CSS variable with the max char number on it. Crafting 100 Buttons with Osmo โณ Total time: 63h

Eduard Bodak

166,023 views โ€ข 2 months ago

you can create a CSS only carousel with CSS `๐šœ๐šŒ๐š›๐š˜๐š•๐š•-๐šœ๐š—๐šŠ๐š™` .๐šœ๐šŒ๐š›๐š˜๐š•๐š•๐šŽ๐š› { ๐š˜๐šŸ๐šŽ๐š›๐š๐š•๐š˜๐š -๐šก: ๐šŠ๐šž๐š๐š˜; ๐šœ๐šŒ๐š›๐š˜๐š•๐š•-๐šœ๐š—๐šŠ๐š™-๐š๐šข๐š™๐šŽ: ๐šก ๐š–๐šŠ๐š—๐š๐šŠ๐š๐š˜๐š›๐šข; ๐šœ๐šŒ๐š›๐š˜๐š•๐š•-๐š™๐šŠ๐š๐š๐š’๐š—๐š-๐š’๐š—๐š•๐š’๐š—๐šŽ: ๐Ÿท.๐Ÿป๐š›๐šŽ๐š–; /* ๐š–๐šŠ๐š๐šŒ๐š‘๐šŽ๐šœ ๐šข๐š˜๐šž๐š› ๐šœ๐šŒ๐š›๐š˜๐š•๐š•-๐š™๐š•/๐š™๐š› */ } .๐šŒ๐šŠ๐š›๐š { ๐šœ๐šŒ๐š›๐š˜๐š•๐š•-๐šœ๐š—๐šŠ๐š™-๐šŠ๐š•๐š’๐š๐š—: ๐šŒ๐šŽ๐š—๐š๐šŽ๐š›; ๐š๐š•๐šŽ๐šก-๐šœ๐š‘๐š›๐š’๐š—๐š”: ๐Ÿถ; } When you scroll, it snaps exactly in the center of the card Super fun to use, easy to implement, no javascript required

Manu Arora

56,137 views โ€ข 3 months ago