2013-10-03 193 views
0

讓我的背景圖像難以置頂我的CSS漸變。這是我擁有的,但是當我在手機上打開它時,圖像位於漸變背景後面。這是在移動設備上使用的最新版本的IOS和Android。如何在我的CSS漸變背景圖像上放置背景圖像

body { 
background-size:cover; 
background-image: linear-gradient(bottom, rgb(20,36,130) 44%, rgb(255,255,255) 67%, rgb(7,22,137) 26%), url(main_BG.png); 
background-image: -o-linear-gradient(bottom, rgb(20,36,130) 44%, rgb(255,255,255) 67%, rgb(7,22,137) 26%), url(main_BG.png); 
background-image: -moz-linear-gradient(bottom, rgb(20,36,130) 44%, rgb(255,255,255) 67%, rgb(7,22,137) 26%), url(main_BG.png); 
background-image: -webkit-linear-gradient(bottom, rgb(20,36,130) 44%, rgb(255,255,255) 67%, rgb(7,22,137) 26%),url(main_BG.png); 
background-image: -ms-linear-gradient(bottom, rgb(20,36,130) 44%, rgb(255,255,255) 67%, rgb(7,22,137) 26%),url(main_BG.png); 
background-repeat:no-repeat, no-repeat; 

background-image: -webkit-gradient(
    linear, 
    left bottom, 
    left top, 
    color-stop(0.44, rgb(20,36,130)), 
    color-stop(0.67, rgb(255,255,255)), 
    color-stop(0.26, rgb(7,22,137)),url(main_BG.png); 
    ); 
} 
+0

你可以通過你的代碼在「http://jsfiddle.net/」或給工作網站上的鏈接 – Anon

回答

0

只要首先放置圖像網址就可以了。

background-image:url(main_BG.png), linear-gradient(bottom, rgb(20,36,130) 44%, 
rgb(255,255,255) 67%, rgb(7,22,137) 26%);