Skip to content

A simple script designed to mimmic the CSS background-attachment: fixed property on a linear gradient.

Notifications You must be signed in to change notification settings

AlexFMJ/JSFixedLinearGradient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

A simple script designed to mimmic the CSS background-attachment: fixed property on a linear gradient. The purpose being that Safari browsers (ios) don't implement this property.

The script takes two colors in the form of RGB values, identifies all elements on the page that include the "gradient" class, and applies a linear gradient of those colors to each element to appear fixed when scrolling vertically.

About

A simple script designed to mimmic the CSS background-attachment: fixed property on a linear gradient.

Resources

Stars

Watchers

Forks