lee 1241 0 2017-02-01 19:59:47

css设置背景图片不随浏览器滚动条滚动,即固定背景图片
 
body{
background-image:url("../../common/images/bg1.jpg");
background-attachment: fixed;
background-repeat: no-repeat; }
其中background-attachment: fixed;属性控制背景图片固定