CSS3渐变对角线如何应用?

Fl0*_*D3R 1 html5 gradient button css3

我需要创建这样一个按钮响应:

http://666kb.com/i/c8fo3yb8fna7ji17u.jpg

我只想在css3中重新创建它,因为当我将它作为图像嵌入时,它没有响应.

但正如你所看到的,左上角只有一个渐变,所以我怎么意识到它?

我使用了几个梯度生成器但没有一个工作.

希望您能够帮助我.

Alf*_*son 11

我发现了这个,效果很好.http://www.colorzilla.com/gradient-editor/

我得到了一些你可以用作模板的代码.

background: #1e5799; /* Old browsers */

background: -moz-linear-gradient(-45deg,  #1e5799 0%, #2989d8 50%, #207cca 63%, #7db9e8 100%); /* FF3.6+ */

background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-stop(63%,#207cca), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */

background: -webkit-linear-gradient(-45deg,  #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */

background: -o-linear-gradient(-45deg,  #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* Opera 11.10+ */

background: -ms-linear-gradient(-45deg,  #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* IE10+ */

background: linear-gradient(135deg,  #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* W3C */

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
Run Code Online (Sandbox Code Playgroud)