Found 10535 bookmarks
Newest
Sticky, Smooth, Active Nav
Sticky, Smooth, Active Nav
Just like the title says! Here's a sidebar navigation bar that... Uses sticky positioning. It stays on the screen when it can, but won't overlap the
·css-tricks.com·
Sticky, Smooth, Active Nav
Scroll to anchor with offset when coming from another page
Scroll to anchor with offset when coming from another page
Hi there, Thanks for writing in. That code is for links that directly clicked but not for the page that is loaded. You'll need to add another set of code like this jQuery ( document ).ready ( function($) { var hash= window.location.hash if ( hash == '' || hash == '#' || hash == undefined ) return false; var target = $(hash); headerHeight = 120; target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { ...
·theme.co·
Scroll to anchor with offset when coming from another page
Smooth Scrolling
Smooth Scrolling
Native browser smooth scrolling is like this: // Scroll to specific values // scrollTo is the same window.scroll({ top: 2500, left: 0, behavior: 'smooth'
·css-tricks.com·
Smooth Scrolling
LazyLoad (vanilla-lazyload)
LazyLoad (vanilla-lazyload)
LazyLoad is a fast, lightweight and flexible script that speeds up your web application by loading images only as they enter the viewport. LazyLoad supports responsive images.
·andreaverlicchi.eu·
LazyLoad (vanilla-lazyload)
Solved with CSS! Dropdown Menus | CSS-Tricks
Solved with CSS! Dropdown Menus | CSS-Tricks
A common UI pattern that we see on the web are dropdown menus. They’re used to display related information in pieces, without overwhelming the user with buttons, text, and options. Somewhere that we see these a lot is inside of headers or navigation areas on websites. Let’s see if we can make one of these menus with CSS alone.
·css-tricks.com·
Solved with CSS! Dropdown Menus | CSS-Tricks
Solved with CSS! Logical Styling Based on the Number of Given Elements | CSS-Tricks
Solved with CSS! Logical Styling Based on the Number of Given Elements | CSS-Tricks
Did you know that CSS is Turing complete? Did you know that you can use it to do some pretty serious logical styling? Well you can! You don’t have to set all of your logic-based styling rules in JavaScript, or even have to use JavaScript to set classes you are styling against. In many cases, CSS can handle that itself. I’m still discovering new CSS tricks everyday, and it just makes me love it even more.
·css-tricks.com·
Solved with CSS! Logical Styling Based on the Number of Given Elements | CSS-Tricks
Using Multi-Step Animations and Transitions
Using Multi-Step Animations and Transitions
CSS animations are rad and the concept is fairly simple. Name the animation, define the movement in @keyframes and then call that animation on an element.
·css-tricks.com·
Using Multi-Step Animations and Transitions
oncebot/pushbar.js
oncebot/pushbar.js
pushbar.js - Tiny javascript plugin for creating sliding drawers in web apps
·github.com·
oncebot/pushbar.js
Building A Static Site With Components Using Nunjucks
Building A Static Site With Components Using Nunjucks
Even if you don’t use any client-side JavaScript at all to build a site, it doesn’t mean you have to give up on the idea of building with components. Learn how to build a static site with the help of …
·smashingmagazine.com·
Building A Static Site With Components Using Nunjucks
Four Killer Features of Nunjucks
Four Killer Features of Nunjucks
Nunjucks calls itself "A rich and powerful templating language for JavaScript", which sounds about right. It's not intentionally super lightweight like
·css-tricks.com·
Four Killer Features of Nunjucks
DIY Talc-Free Baby Powder
DIY Talc-Free Baby Powder
My book publisher forwarded some interview questions to me from a British magazine a while back. One of the questions was, "Why would people want to make their own body care products instead of buying
·nwedible.com·
DIY Talc-Free Baby Powder
Lazy loading images using Intersection Observer
Lazy loading images using Intersection Observer
If you haven’t had the chance to watch it yet, Paul Lewis put together an awesome video series that demonstrates how to build a media player alongside some of the great features of Progressive Web App…
·deanhume.com·
Lazy loading images using Intersection Observer