http://upcircuit.org/
基本上,固定背景就是这里的诀窍.
但有多个背景,我试图解决这个网站的技巧:))
我尝试扫描页面源,但我不知道他们是如何做到的.解决方法 它们的面板大小与窗口一样大.然后他们正在做的是为每个面板设置背景图像并设置其背景附件:固定,使其相对于窗口保持定位,而不是它所在的div.
我在这里为你设置了基础:http://jsfiddle.net/Zc822/
body,HTML { wIDth: 100%; // Sets the HTML and body wIDth and height height: 100%; // to the wIDth and height of the window. margin: 0;}.panel{ wIDth: 100%; // Sets each panel to the wIDth and height height: 100%; // of the body (which is set to the window) background-repeat: no-repeat; background-attachment: fixed; //Sets background fixed in window background-size: cover;}
然后,您只需为每个面板指定背景图像.
很确定这就是你要找的东西.
总结以上是内存溢出为你收集整理的HTML / CSS – 滚动时修复背景全部内容,希望文章能够帮你解决HTML / CSS – 滚动时修复背景所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)