使用 CSS3 製作一組逾時尚的動畫按鈕效果

來源:互聯網
上載者:User

標籤:style   blog   http   io   color   ar   os   使用   java   

  通過 CSS3 的新特性,我們創作出好的互動和效果的可能性大大增加。這篇文章中,我想與大家分享一些 CSS3 動畫按鈕效果。我們的想法是建立一個具有不同風格的一些動畫連結元素,滑鼠移至上方時有動畫效果和活動狀態。

 

 

效果示範     外掛程式下載

 

HTML 範例程式碼:

<a href="#" class="a-btn">    <span class="a-btn-slide-text">$29</span>    <img src="images/icons/1.png" alt="Photos" />    <span class="a-btn-text"><small>Available on the Apple</small> App Store</span>     <span class="a-btn-icon-right"><span></span></span></a>

CSS 範例程式碼:

.a-btn{    background: linear-gradient(top, #a9db80 0%,#96c56f 100%);    padding-left: 90px;    padding-right: 105px;    height: 90px;    display: inline-block;    position: relative;    border: 1px solid #80ab5d;    box-shadow:         0px 1px 1px rgba(255,255,255,0.8) inset,         1px 1px 3px rgba(0,0,0,0.2);    border-radius: 4px;    float: left;    clear: both;    margin: 10px 0px;    overflow: hidden;    transition: box-shadow 0.3s ease-in-out;}.a-btn img{    position: absolute;    left: 15px;    top: 13px;    border: none;    transition: all 0.3s ease-in-out;}.a-btn .a-btn-slide-text{    position: absolute;    font-size: 36px;    top: 18px;    left: 18px;    color: #6d954e;    opacity: 0;    text-shadow: 0px 1px 1px rgba(255,255,255,0.4);    transition: opacity 0.2s ease-in-out;}.a-btn-text{    padding-top: 13px;    display: block;    font-size: 30px;    text-shadow: 0px -1px 1px #80ab5d;}.a-btn-text small{    display: block;    font-size: 11px;    letter-spacing: 1px;}.a-btn-icon-right{    position: absolute;    right: 0px;    top: 0px;    height: 100%;    width: 80px;    border-left: 1px solid #80ab5d;    box-shadow: 1px 0px 1px rgba(255,255,255,0.4) inset;}.a-btn-icon-right span{    width: 38px;    height: 38px;    opacity: 0.7;    border-radius: 20px;    position: absolute;    left: 50%;    top: 50%;    margin: -20px 0px 0px -20px;    border: 1px solid rgba(0,0,0,0.5);    background: #4e5c50 url(../images/arrow_down.png) no-repeat center center;    box-shadow:         0px 1px 1px rgba(255,255,255,0.3) inset,         0px 1px 2px rgba(255,255,255,0.5);    transition: all 0.3s ease-in-out;}

 

您可能感興趣的相關文章
  • Web 開發中很實用的10個效果【源碼下載】
  • 精心挑選的優秀jQuery Ajax分頁外掛程式和教程
  • 12個讓人驚歎的的創意的 404 錯誤頁面設計
  • 讓網站動起來!12款優秀的 jQuery 動畫外掛程式
  • 十分驚豔的8個 HTML5 & JavaScript 特效

 

本文連結:學習使用 CSS3 製作一組漂亮的動畫按鈕效果

編譯來源:夢想天空 ◆ 關注前端開發技術 ◆ 分享網頁設計資源

使用 CSS3 製作一組逾時尚的動畫按鈕效果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.