我需要創建這樣一個按鈕響應:CSS3漸變對角線如何應用?
http://666kb.com/i/c8fo3yb8fna7ji17u.jpg
我只是想出了重新創建CSS3中,因爲當我把它嵌入作爲圖像,它不響應。
但是正如你所看到的,它只在左上角有一個漸變,所以我怎麼知道它?
我使用了幾個梯度發生器,但他們都沒有工作。
希望你能幫助我。
我需要創建這樣一個按鈕響應:CSS3漸變對角線如何應用?
http://666kb.com/i/c8fo3yb8fna7ji17u.jpg
我只是想出了重新創建CSS3中,因爲當我把它嵌入作爲圖像,它不響應。
但是正如你所看到的,它只在左上角有一個漸變,所以我怎麼知道它?
我使用了幾個梯度發生器,但他們都沒有工作。
希望你能幫助我。
我發現這個,效果很好。 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 */
這是爲了得到適當的梯度對角線的風格在你的模板的方式:
background: linear-gradient(-40deg, #4378bf 18%,#3689ce 48%,#428fd0 59%,#8fb3da 100%);
感謝您的回答,但我已經嘗試過同樣的發電機。 問題是,它幾乎不可能使它看起來像我的按鈕:( – Fl0R1D3R