是否可以将背景图像和背景渐变颜色一起应用到1个div标签中? (CSS3及以上版本)1个标签中的背景图像和背景
我有下面的代码,渐变背景颜色显示,但背景图像没有。
我错过了什么?
background: -webkit-gradient(linear, left top, left bottom, from(#595959), to(#2e2e2e));
background-image:url('/uploads/image1.jpg') no-repeat;
-webkit-background-size: 33px 33px;
border-bottom:1px solid #636363;
height:39px;
-moz-border-radius-bottomleft:0px;
-webkit-border-bottom-left-radius: 0px;
-moz-border-radius-topright:10px;
-webkit-border-top-right-radius: 10px;
感谢,
三通
参见:http://stackoverflow.com/questions/2504071/is-it-possible-to-combine-a-background-image -and-css3-gradients – nico 2010-06-01 07:02:35
我一直都在使用它,因为我非常喜欢css3。为避免任何复杂情况,我建议您只需使用css3渐变和标签。尽管付出了很大的努力,所有尝试制作完全跨浏览器兼容的多种后台解决方案都失败 – 2012-02-20 03:52:21