一款基jquery超炫的動畫導覽功能表

來源:互聯網
上載者:User

標籤:style   blog   http   io   color   ar   for   sp   div   

今天給大家分享一款基jquery超炫的動畫導覽功能表。這款導覽功能表,初始時頁面中間一個按鈕,單擊按鈕,菜單從左側飛入頁中。再次單擊按鈕,導航飛入左側訊息。動畫效果很非常炫。一起看下:

線上預覽   源碼下載

實現的代碼。

html代碼:

 <ul>        <li><a href="http://www.w2bc.com">First</a></li>        <li><a href="http://www.w2bc.com">Second</a></li>        <li><a href="http://www.w2bc.com">Third</a></li>        <li><a href="http://www.w2bc.com">Fourth</a></li>        <li><a href="http://www.w2bc.com">Fifth</a></li>    </ul>    <button>        Animate</button>    <script src=‘jquery.js‘></script>    <script>        $(‘button‘).on(‘click‘, function () {            $(‘ul‘).toggleClass(‘animate‘);        }); //@ sourceURL=pen.js    </script>

css代碼:

 body        {            text-align: center;        }                ul        {            width: 400px;            padding: 0;            margin: 0 auto;        }        ul.animate li        {            transform: translate(0);        }        ul.animate li:nth-of-type(1)        {            transition-delay: 0.05s;        }        ul.animate li:nth-of-type(2)        {            transition-delay: 0.1s;        }        ul.animate li:nth-of-type(3)        {            transition-delay: 0.15s;        }        ul.animate li:nth-of-type(4)        {            transition-delay: 0.2s;        }        ul.animate li:nth-of-type(5)        {            transition-delay: 0.25s;        }                li        {            list-style: none;            display: block;            padding: 20px;            margin: 12px 0;            border-radius: 5px;            font-family: Helvetica, sans-serif;            color: #fff;            background: #8DE48D;            transform: translate(-500%);            transition: transform 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.08);        }        li:nth-of-type(5)        {            transition-delay: 0.15s;        }        li:nth-of-type(4)        {            transition-delay: 0.3s;        }        li:nth-of-type(3)        {            transition-delay: 0.45s;        }        li:nth-of-type(2)        {            transition-delay: 0.6s;        }        li:nth-of-type(1)        {            transition-delay: 0.75s;        }                button        {            padding: 12px 18px;            border: none;            border-radius: 3px;            color: #fff;            background: #7DBED8;        }        button:focus        {            outline: none;        }

註:本文愛編程原創文章,轉載請註明原文地址:http://www.w2bc.com/Article/9693

一款基jquery超炫的動畫導覽功能表

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.