Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Site Logo Transition

Started by Muut Archive 11 years ago · 2 replies · 365 views
11 years ago

We have two site wide logo.png's located in /pages/images.. The images are identical, using the antimatter.js to call the logo's depending whether the nav bar is scrolled or not. With this method the transition is very abrupt. Within Antimatter is there a method by which we can use a single logo.png and use Grav's abilities to automatically resize this logo on scroll?

11 years ago

Sorry, the images are identical other than the size!

11 years ago

This is nothing to do with Grav actually. it's simply a CSS transition based on a class that is being added by JS.

You can't do a CSS transition between two images however, this is just not possible with CSS. You can fake it but it will never be super smooth.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1351 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4062 9 years ago
Archive · by Muut Archive, 9 years ago
1 2948 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago