2012-12-01 38 views
3

我有一個默認的css工作表,它使用圖像作爲背景,但是我想用純色覆蓋圖像的移動版網站。這是用純色覆蓋css背景圖像的正確方法嗎?

我的默認樣式表看起來是這樣的:

background-image: url('../img/gray_hash.png'); 

我現在的CSS文件看起來像這樣:

background-image: url(''); 
background-color: #ffffff; !important; 

這是做了正確的方法是什麼?如果我只是簡單地添加一個背景顏色,圖像看起來優先。

+0

'背景color'覆蓋是'背景下, '圖像',其實不會影響其他本身。 – ultranaut

回答

12

號刪除背景圖像,使用background-image:none

0

我只想用速記

background: url('../img/gray_hash.png'); // (with any other properties needed) 

background: white;