我有以下问题: 写一个网页,上面有一条用渐变色构建的彩虹。彩虹应倾斜一个角度(它不应该是完全水平的),左侧彩虹的宽度应小于右侧彩虹的宽度。
我不知道如何用宽度做部分。任何人都可以帮助我吗?
#grad1 {
height: 200px;
background: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet);
}

<div id="grad1"></div>
&#13;
答案 0 :(得分:0)
您可以在 public static void AddTracks(IEnumerable<Track> trackList)
{
LinqToSqlDataContext dbContext = new LinqToSqlDataContext();
var tracks = from field in trackList
select new TrackTable
{
Track_Id = field.Id,
Title = field.Title,
Album = field.Album,
Artist = field.Artist,
Duration = field.Duration,
Path = field.Path,
Image_Path = field.ImagePath
};
dbContext.TrackTables.InsertAllOnSubmit(tracks);
dbContext.SubmitChanges();
}
属性中使用多个背景,因此可以使用许多background
。这是一个使用许多渐变的丑陋的彩虹:
gradients
&#13;
#grad1 {
height: 200px;
background: linear-gradient(78deg, red 5%, transparent 7%), linear-gradient(69deg, orange 10%, transparent 12%), linear-gradient(60deg, yellow 15%, transparent 17%), linear-gradient(51deg, green 20%, transparent 22%), linear-gradient(43deg, blue 25%, transparent 27%), linear-gradient(35deg, indigo 30%, transparent 32%), linear-gradient(28deg, violet 35%, transparent 37%);
}
&#13;
这不是完美的,但它是一个开始......摆弄价值观,你会得到你想要的东西。