我是新来的精灵,这个特殊的任务是让我惊叹 - 请帮助别人。CSS两个背景图像使用精灵
我目前使用两个背景图像像这样:
body {
background-attachment: fixed;
background-image: url("images/bktopright.png"), url("images/bkbottomleft.png");
background-position: right top, left bottom;
background-repeat: no-repeat;
line-height: 1;
min-width: 1150px;
}
为了提高页面加载时间我现在想用一个形象,一个精灵。我认为这是独一无二的,因为我希望在背景上使用相同的图像两次,其中我在浏览器窗口的右上角显示图像的一部分,并在左下角显示图像的一部分。我想要展示的图像的两个部分都是600px宽×400px高。
如果新图片宽1700px,高1100px并称为“background.jpg”,我将如何调整代码以实现此目的?
Duplicate post: - http://www.stackoverflow.com/questions/7653240/multiple-background-images-using-css3-and-sprites – rgvcorley 2012-04-28 14:59:50
你发现我的下面的答案有用吗?没有反应? – Katti 2012-05-24 21:50:00