我是新來的精靈,這個特殊的任務是讓我驚歎 - 請幫助別人。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