2013-06-12 33 views
1

我使用相同的高分辨率的背景作爲固定體的背景和我有五個要素使用它,以及使用多個元素和瀏覽器的性能相同的固定背景

body{ 
    background: url(highres.png) top center; 
    background-attactment: fixed; 
} 

box1{ 
    background: url(highres.png) top center; 
    background-attactment: fixed; 
} 
box2{ 
    background: url(highres.png) top center; 
    background-attactment: fixed; 
} 
....... 
....... 

我的問題是,如果我使用的網址(image.png)幾次,瀏覽器一次加載一次或每個url?這是否會成爲瀏覽體驗緩慢的原因?

回答

3

這樣,它讀取三次:你可以這樣做

body, #box1, #box2{ 
    background: url(highres.png) top center; 
    background-attactment: fixed; 
} 

和明年它,你可以他們的風格就像你通常會

+0

做沒問題:) .. – ErikMes

相關問題