具有多个背景的线性渐变

时间:2016-07-11 18:30:08

标签: css css3 background gradient

具有多个背景的线性渐变的语法是什么?我的代码只生成黄色而不是从黄色到粉红色的毕业?

background-color: rgba(red,1);
background:
    url(/src/stat/chevronRight.svg) 90% 45% no-repeat,
    linear-gradient(to bottom, rgba(yellow,1) 0%, rgba(pink,1) 100%);
background-size: 7px;

非常感谢

马丁

1 个答案:

答案 0 :(得分:0)

您可以将颜色设置为单词yellow,也可以使用RGBRGBAHexadecimal颜色值。

div {
  height: 100vh;
  background: url('http://placehold.it/150x150'), linear-gradient(to bottom, yellow, pink);
  background-repeat: no-repeat;
}
<div></div>