Heads up! This post was written 13 years ago. Some information might be outdated or may have changed since then.
.gradient_(@from,@to){
background: @from;
-o-background-size: 100% 100%;
-moz-background-size: 100% 100%;
-webkit-background-size: 100% 100%;
background-size: 100% 100%;
background: -webkit-gradient(
linear,
left top, left bottom,
from(@from),
to(@to)
);
background: -webkit-linear-gradient(
top,
@from,
@to
);
background: -moz-linear-gradient(
top,
@from,
@to
);
background: -o-linear-gradient(
top,
@from,
@to
);
background: linear-gradient(
top,
@from,
@to
);
} Използва се по познатия начин:
.gradient_ {
color: #efebec;
background: #e1e1e1;
}