2013-10-03 191 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%);