如何添加多个css渐变作为多个背景? [英] How to add multiple css gradient as a multiple background?
本文介绍了如何添加多个css渐变作为多个背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想制作一个这样的按钮,而不使用渐变作为多个背景的图像。
I want to make a button like this without using image by gradients as multiple background. is it possible?
使用单个元素
<span class="customStyleSelectBox">Dummy Text</span>
尝试jsfiddle这里 http://jsfiddle.net/Awf6s/2/
推荐答案
您可以用逗号分隔多个渐变。例如:
You can define multiple gradients comma-separated. E.g.:
.customStyleSelectBox {
...
background: linear-gradient(#fff, #999) no-repeat border-box, linear-gradient(#eee, #777) no-repeat border-box;
background-size: 98px 50px, 18px 50px;
background-position: 0 0, 98px 0;
background-origin: padding-box, padding-box;
}
这篇关于如何添加多个css渐变作为多个背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文