0

我想要实现的是将使用十六进制颜色值的现有网络渐变更改为只是黑色的网络渐变,并在需要时添加不透明度以使背景颜色变暗。

所以,转换这个:

background-color: #76b347;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #76b347), color-stop(100%, #5e9e2e));
background-image: linear-gradient(top, #76b347, #5e9e2e);

对于这样的事情(但具有正确的值,所以它看起来是一样的):

background-color: #76b347;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0.3)));
background-image: linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
4

0 回答 0