1

我正在尝试获得具有多种背景的背景来工作。我正在考虑使用base64编码图像和渐变,我想知道如何将两者结合起来......

这是我所拥有的:

.el  {  
    background-color: #ebe5e5;
    background-position: 50% 50%;
    background: url(data:image/png;base64,iV...10k of foo...CC);
    background: -webkit-gradient(linear, left top, left bottom, from(#ebe5e5), to(#e1dbdb));
    background: -webkit-linear-gradient(center top, #ebe5e5, #e1dbdb);
    background:    -moz-linear-gradient(center top, #ebe5e5, #e1dbdb);
    background:      -o-linear-gradient(center top, #ebe5e5, #e1dbdb);
    background:         linear-gradient(center to bottom, #ebe5e5, #e1dbdb);
    }

我想知道我是否需要同时指定两个背景background1, background2,但这意味着我的 base64 编码图像字符串必须多次声明,因此它太大了。

问题:
有没有一种方法可以使用具有渐变和 base64 编码图像的多个 CSS 背景,而不必为每个浏览器前缀指定 base64 图像?

4

0 回答 0