多色吧,我想在下面的圖片創建像一個多色彩條:創建使用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