*更新
我相信我之前错误地解释了我的问题。我想知道是否有可能有一个 div 从上到下有 2 个渐变,从半到下也有从左到右的渐变。
Div 在上半部分从颜色 A1 到 A5,而下半部分从 A6 到 A10。
同时,div的上半部分从颜色A1-A5变为颜色B(从左到右)
虽然 div 的下半部分从颜色 A6-A10 变为颜色 B(从左到右)
任何帮助将不胜感激,
谢谢
*更新 2
所以基本上这个,仅作为一个例子:
http://jsfiddle.net/guiissasso/kF9QV/6/
正确的渐变显示在左侧 div 上(我知道我使用表格进行布局)。我希望右侧的 2 个 div 以与左侧的 div 相同的渐变开始(从上到下)并且同时具有从左到右的渐变,因此它会淡出为白色背景那个div的结尾。
除了最好但不是必须的,右边的 div 实际上是一个 div。
希望这能说明问题。
HTML
<table>
<tr>
<td rowspan="2" class="actualgradient"> </td>
<td class="toplefttoright"> </td>
</tr>
<tr>
<td class="bottomlefttoright"> </td>
</tr>
</table>
<p>Example</p>
CSS
.horizontal
{
background: #ffb76b; /* Old browsers */
background: -moz-linear-gradient(top, #ffb76b 0%, #ffa73d 50%, #ff7c00 51%, #ff7f04 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffb76b), color-stop(50%,#ffa73d), color-stop(51%,#ff7c00), color-stop(100%,#ff7f04)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffb76b 0%,#ffa73d 50%,#ff7c00 51%,#ff7f04 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffb76b 0%,#ffa73d 50%,#ff7c00 51%,#ff7f04 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffb76b 0%,#ffa73d 50%,#ff7c00 51%,#ff7f04 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffb76b 0%,#ffa73d 50%,#ff7c00 51%,#ff7f04 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffb76b', endColorstr='#ff7f04',GradientType=0 ); /* IE6-9 */
width:200px;
height:100px;
}
.toplefttoright
{
background-image: -ms-linear-gradient(right, #FFFFFF 0%, #FFA73D 100%);
background-image: -moz-linear-gradient(right, #FFFFFF 0%, #FFA73D 100%);
background-image: -o-linear-gradient(right, #FFFFFF 0%, #FFA73D 100%);
background-image: -webkit-gradient(linear, right top, left top, color-stop(0, #FFFFFF), color-stop(1, #FFA73D));
background-image: -webkit-linear-gradient(right, #FFFFFF 0%, #FFA73D 100%);
background-image: linear-gradient(to left, #FFFFFF 0%, #FFA73D 100%);
width:200px;
height:50px;
}
.bottomlefttoright
{
background-image: -ms-linear-gradient(right, #FFFFFF 0%, #FF7E03 100%);
background-image: -moz-linear-gradient(right, #FFFFFF 0%, #FF7E03 100%);
background-image: -o-linear-gradient(right, #FFFFFF 0%, #FF7E03 100%);
background-image: -webkit-gradient(linear, right top, left top, color-stop(0, #FFFFFF), color-stop(1, #FF7E03));
background-image: -webkit-linear-gradient(right, #FFFFFF 0%, #FF7E03 100%);
background-image: linear-gradient(to left, #FFFFFF 0%, #FF7E03 100%);
width:200px;
height:50px;
}
.actualgradient
{
background-image: -ms-linear-gradient(top, #FFB463 0%, #FF7E03 100%);
background-image: -moz-linear-gradient(top, #FFB463 0%, #FF7E03 100%);
background-image: -o-linear-gradient(top, #FFB463 0%, #FF7E03 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #FFB463), color-stop(1, #FF7E03));
background-image: -webkit-linear-gradient(top, #FFB463 0%, #FF7E03 100%);
background-image: linear-gradient(to bottom, #FFB463 0%, #FF7E03 100%);
width:200px;
height:100px;
}