【发布时间】:2019-05-29 09:14:56
【问题描述】:
我只有 CSS 的基本知识。我正在尝试按照以下准则为我的一项 ITEM 提供渐变颜色,并且渐变应该是垂直的。
我尝试了下面的方法,但整个地区只有第一种颜色。我不明白 30% 和 50%。如何做到这一点?
.myheader {
background: linear-gradient(to bottom, #mycolor1 85%, #mycolor2 45%, #mycolor3 10%);
}
【问题讨论】:
-
不确定你从哪里得到这些数字,但
background: linear-gradient(to bottom, blue, red);应该这样做。
标签: html css linear-gradients