Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 3, 2020 03:04 pm GMT

On fixed elements and backgrounds

After just playing with apsect-ratio and being pleasantly surprised at how intuitive it is, here’s an example of CSS acting unintuitively:

If you have a fixed element on your page, which means it doesnt move when you scroll, you might realise that it no longer acts fixed if you apply a CSS filter on its nearest ancestor. Go ahead, try it on the CodePen.

This is because applying a filter on the fixed elements immediate parent makes it

Read article “On fixed elements and backgrounds”

The post On fixed elements and backgrounds appeared first on CSS-Tricks.


Original Link: https://chenhuijing.com/blog/on-fixed-elements-and-backgrounds/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks