I want the SVG to remain fixed on scroll (Or maybe move with the speed of scroll to look fixed). CSS didn't help. It ruins the code. Please answer.
If I use display:fixed;
in CSS, then the whole scrolling javascript doesn't work.
Here's the jsfiddle: http://jsfiddle.net/tashfene/58zNp/1/
Please help!
You could try something like this: http://jsfiddle.net/Sladkoff/H6vVJ/
Basically you set the svg to position: fixed;
, and put another div around it that is high enough for the page to scroll.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.