An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
June 3, 2020 03:04 pm GMT
Original Link: https://chenhuijing.com/blog/on-fixed-elements-and-backgrounds/
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:
Tweet
View Full Article