欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

一款純css3實現(xiàn)的顏色漸變按鈕的代碼教程

  發(fā)布時間:2014-11-12 10:48:53   作者:佚名   我要評論
今天給大家分享一款純css3實現(xiàn)的顏色漸變按鈕,這款按鈕的邊框和文字的顏色通過css3實現(xiàn)兩種顏色的漸變,清新淡雅,效果非常好看,需要的朋友可以參考下

  之前為大家分享很多純css3實現(xiàn)的實用按鈕,今天給大家?guī)硪豢罴僣ss3實現(xiàn)的顏色漸變按鈕。這款按鈕的邊框和文字的顏色通過css3實現(xiàn)兩種顏色的漸變,效果非常好看,一起看下效果圖:

  實現(xiàn)的代碼。

  html代碼:

XML/HTML Code復制內容到剪貼板
  1. <div class="container">  
  2.        <a target="_blank" class="btn green" href="http://www.dbjr.com.cn/"><span>Nominate Yourself</span></a>  
  3.        <a target="_blank" class="btn orange" href="http://www.dbjr.com.cn/"><span>Nominate Someone</span></a>  
  4.        <a target="_blank" class="btn blue" href="http://www.dbjr.com.cn/"><span>Buy Tickets Now</span></a>  
  5.    </div>  

  css3代碼:

CSS Code復制內容到剪貼板
  1. .btn   
  2.         {   
  3.             displayinline-block;   
  4.             margin: 1em 0;   
  5.             padding: 1em 2em;   
  6.             backgroundtransparent;   
  7.             border2px;   
  8.             border-radius: 3px;   
  9.             font-weight: 400;   
  10.             text-aligncenter;   
  11.         }   
  12.         .btn.green  
  13.         {   
  14.             box-shadow: 0 1px 0 1px rgba(43, 220, 146, 0.25), 0 -1px 0 1px rgba(129, 214, 106, 0.25), 1px 0 0 1px rgba(43, 220, 146, 0.25), -1px 0 0 1px rgba(129, 214, 106, 0.25), 1px -1px 0 1px rgba(86, 217, 126, 0.5), -1px 1px 0 1px rgba(86, 217, 126, 0.5), 1px 1px 0 1px rgba(0, 223, 166, 0.75), -1px -1px 0 1px rgba(173, 211, 86, 0.75);   
  15.         }   
  16.         .btn.green span   
  17.         {   
  18.             background: -webkit-linear-gradient(left#add356#00dfa6);   
  19.             -webkit-background-clip: text;   
  20.             -webkit-text-fill-colortransparent;   
  21.         }   
  22.         .btn.orange   
  23.         {   
  24.             box-shadow: 0 1px 0 1px rgba(255, 102, 43, 0.25), 0 -1px 0 1px rgba(255, 169, 69, 0.25), 1px 0 0 1px rgba(255, 102, 43, 0.25), -1px 0 0 1px rgba(255, 169, 69, 0.25), 1px -1px 0 1px rgba(255, 136, 56, 0.5), -1px 1px 0 1px rgba(255, 136, 56, 0.5), 1px 1px 0 1px rgba(255, 69, 31, 0.75), -1px -1px 0 1px rgba(255, 203, 82, 0.75);   
  25.         }   
  26.         .btn.orange span   
  27.         {   
  28.             background: -webkit-linear-gradient(left#ffcb52#ff451f);   
  29.             -webkit-background-clip: text;   
  30.             -webkit-text-fill-colortransparent;   
  31.         }   
  32.         .btn.blue  
  33.         {   
  34.             -webkit-border-image: -webkit-linear-gradient(left#3dade9#bf2fcb) round;   
  35.             border-image-slice: 1;   
  36.         }   
  37.         .btn.blue span   
  38.         {   
  39.             background: -webkit-linear-gradient(left#3dade9#bf2fcb);   
  40.             -webkit-background-clip: text;   
  41.             -webkit-text-fill-colortransparent;   
  42.         }   
  43.         .btn:nth-of-type(1)   
  44.         {   
  45.             floatleft;   
  46.         }   
  47.         .btn:nth-of-type(2)   
  48.         {   
  49.             floatrightright;   
  50.         }   
  51.         .btn:nth-of-type(3)   
  52.         {   
  53.             width: 100%;   
  54.             clearleft;   
  55.             padding: .75em;   
  56.             font-size: 3em;   
  57.             font-weight: 100;   
  58.             line-height: 1;   
  59.             letter-spacing1px;   
  60.         }   
  61.            
  62.         *   
  63.         {   
  64.             -moz-box-sizing: border-box;   
  65.             box-sizing: border-box;   
  66.         }   
  67.            
  68.         body   
  69.         {   
  70.             fontnormal 1em 'Helvetica Neue' , Helveticasans-serif;   
  71.             background#1d2025;   
  72.             -webkit-font-smoothing: antialiased;   
  73.             text-rendering: optimizeLegibility;   
  74.         }   
  75.            
  76.         .container   
  77.         {   
  78.             width: 60%;   
  79.             marginauto;   
  80.             positionabsolute;   
  81.             top: 50%;   
  82.             left: 50%;   
  83.             -webkit-transform: translate(-50%, -50%);   
  84.             -ms-transform: translate(-50%, -50%);   
  85.             transform: translate(-50%, -50%);   
  86.         }   
  87.         .container:after   
  88.         {   
  89.             display: table;   
  90.             content'';   
  91.             clearboth;   
  92.         }   
  93.            
  94.         a   
  95.         {   
  96.             color: inherit;   
  97.             text-decorationnone;   
  98.         }   
  99.            
  100.         h1.method1   
  101.         {   
  102.             background: -webkit-linear-gradient(left#ef0#f00);   
  103.             -webkit-background-clip: text;   
  104.             -webkit-text-fill-colortransparent;   
  105.         }  

  以上就是今天給大家?guī)硪豢罴僣ss3實現(xiàn)的顏色漸變按鈕的代碼,是不是很漂亮,謝謝閱讀,希望能幫到大家,請繼續(xù)關注腳本之家,我們會努力分享更多優(yōu)秀的文章。

相關文章

  • 使用CSS3實現(xiàn)字體顏色漸變的實現(xiàn)

    這篇文章主要介紹了使用CSS3實現(xiàn)字體顏色漸變的實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習
    2020-08-10

最新評論