多色吧,我想在下面的图片创建像一个多色彩条:创建使用CSS
是否有可能创建CSS将实现这一目标?我已经成功使用以下CSS创建颜色的渐变:
.gold{
background-color: #faa732;
background-image: -moz-linear-gradient(top, #eab92d, #c79810);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#eab92d), to(#c79810));
background-image: -webkit-linear-gradient(top, #eab92d, #c79810);
background-image: -o-linear-gradient(top, #eab92d, #c79810);
background-image: linear-gradient(to bottom, #eab92d, #c79810);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
}
.blue {
background-color: #faa732;
background-image: -moz-linear-gradient(top, #034a96, #0663c7);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#034a96), to(#0663c7));
background-image: -webkit-linear-gradient(top, #034a96, #0663c7);
background-image: -o-linear-gradient(top, #034a96, #0663c7);
background-image: linear-gradient(to bottom, #034a96, #0663c7);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
}
.green {
background-color: #faa732;
background-image: -moz-linear-gradient(top, #0D7626, #0a611e);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0D7626), to(#0a611e));
background-image: -webkit-linear-gradient(top, #0D7626, #0a611e);
background-image: -o-linear-gradient(top, #0D7626, #0a611e);
background-image: linear-gradient(to bottom, #0D7626, #0a611e);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
}
我只是不知道如何使他们出现在画面像彼此相邻,以及如何有不同的百分比宽度(例如蓝色渐变50%的酒吧,绿色渐变40%,黄金渐变10%)。
什么部分?渐变?你有任何标记开始? – woz
什么“它”?这是什么”?发布您尝试过的HTML和CSS。 –
嘲笑你的想象力在这里不会帮助你很多..在这里尝试一些代码 – swapnesh