怎样使上层滑动时,下层背景不动?

来源:百度知道 编辑:UC知道 时间:2024/06/05 11:00:19
就像许多模块一样,最底层的背景始终不动,只有上层的模块滑动.

◆空间固定背景
把第一行变成
body{background:url(图片地址) no-repeat;background-position: center;background-attachment: fixed;}

/*如何设定+固定百度空间的背景*/
在body{}中加入
background-image:url(图片地址) ; 定义背景图片
background-repeat: no-repeat; 定义背景图片不重复
background-position: center; 定义背景居中
background-attachment: fixed; 定义背景固定,不滚动参数fixed

参考资料:http://hi.baidu.com/0454ldk/blog/item/ac810546e845f0096b63e5c1.html

photoshop的话
选择工具兰里的工具(X:2,Y:1),黑色的箭头