DEV Community

Mbenga
Mbenga

Posted on

13 7

Oh a jelly button & a css hack

Just wanting to show you all a ccs hack.
It use the combinaison of blur & contrast. You should wirte something like that :

.container{
  filter: contrast(20);
  background:white;
  .content1,.content2{
    filter:blur(0.5em);
    background:black;
  }
}
Enter fullscreen mode Exit fullscreen mode

This will make the components a bit like sticky when they move close to each other. You can use it to make some nice loaders, or like that some button :

Top comments (1)

Collapse
 
perpetual_education profile image
perpetual . education

That's fun! Thanks for sharing!!!

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series