Jemt / SitemagicCMS

Sitemagic CMS - world's most beautiful Content Management System
http://sitemagic.org
Other
16 stars 11 forks source link

Designer - SMDesignerElement: background image has position:fixed #107

Open Jemt opened 5 years ago

Jemt commented 5 years ago

The designer supports custom "designable" elements which allows the user to select a background image. But the image has background-attachment:fixed which means the image position is fixed to the viewport rather than the container in which it is being used. And while it gives us a very cool effect when scrolling, this is not always the desirable behaviour. Allow user to choose positioning behaviour: fixed (background-attachment:fixed set) or static (background-attachment not set).

Notice how image position is the same when scrolling, giving us the impression that the container is a "window" (transparent layer) allowing us to peak at the wallpaper behind the website.

image

image