我有以下代码:
@color : #d14836;
.stripes span {
-webkit-background-size: 30px 30px;
-moz-background-size: 30px 30px;
background-size: 30px 30px;
background-image: -webkit-gradient(linear, left top, right bottom,
color-stop(.25, rgba(209, 72, 54, 1)), color-stop(.25, transparent),
color-stop(.5, transparent), color-stop(.5, rgba(209, 72, 54, 1)),
color-stop(.75, rgba(209, 72, 54, 1)), color-stop(.75, transparent),
to(transparent));
我需要转换@color
为rgba(209, 72, 54, 1)
.
所以我需要在我的代码中用一个从我的变量rgba(209, 72, 54, 1)
生成一个值的 Less 函数替换。rgba()
@color
我怎样才能用更少的东西做到这一点?