Home > database >  How to scroll content without moving `<body>` background
How to scroll content without moving `<body>` background

Time:09-29

I am trying to make a page with a glass morphism effect. I don't want to move a background of the body. I want to move only .container. Is this possible? Here the code that I'm using:

CodePudding user response:

change position: absolute; to position: fixed; for your pseudo-elements. That will align the background to the top of the viewport instead of the body document.

  • Related