基于jQuery代碼實(shí)現(xiàn)圓形菜單展開收縮效果
廢話不多說了,直接給大家貼代碼了,具體代碼如下所示:
<head> <script src="js/jquery.min.js"></script> <script src="js/jquery.menu.js"></script> <style> body { margin:0 auto; background:none repeat scroll 0 0 #FCFCFC } .outer_container { height:200px; position:relative } .menu_button { position:absolute; bottom:0; left:0; border-radius:50%; height:36px; width:36px; border:4px solid #fff; box-shadow:rgba(0,0,0,.3) 0 3px 8px 0,rgba(0,0,0,.2) 0 0 0 1px,inset rgba(0,0,0,.3) 0 0 0 1px,inset rgba(255,255,255,.3) 0 1px 0 1px; text-indent:-99999px; overflow:hidden; background-color:#e34f3f; background-image:-moz-linear-gradient(top, #f76f54, #c61f1f); background-image:-ms-linear-gradient(top, #f76f54, #c61f1f); background-image:-webkit-gradient(linear,0 0,0 100%,from( #f76f54),to( #c61f1f)); background-image:-webkit-linear-gradient(top, #f76f54, #c61f1f); background-image:-o-linear-gradient(top, #f76f54, #c61f1f); background-image:linear-gradient(top, #f76f54, #c61f1f); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f76f54', endColorstr='#c61f1f', GradientType=0); z-index:9999; outline:0 } .menu_button span { display:block; height:36px; width:36px; background:url("../images/cross.png") no-repeat center center; -webkit-transition:.4s ease; -moz-transition:.4s ease; -ms-transition:.4s ease; -o-transition:.4s ease; transition:.4s ease; background-size:20px 20px } .menu_option { bottom:18px; left:5px; position:absolute } .menu_option li { position:absolute; display:block; top:0; left:0; -webkit-transition:.3s; -moz-transition:.3s; -ms-transition:.3s; -o-transition:.3s; transition:.3s } .menu_option li a { position:relative; display:block; border-radius:50%; width:26px; height:26px; border:3px solid #fff; box-shadow:rgba(0,0,0,.4) 0 0 5px 0,rgba(0,0,0,.2) 0 0 0 1px,inset rgba(0,0,0,.5) 0 0 2px 0; text-indent:-99999px; overflow:hidden; background:#444 } .menu_option li a span { background-attachment:scroll; background-clip:border-box; background-color:transparent; background-image:url("../images/usr.png"); background-origin:padding-box; background-position:center center; background-repeat:no-repeat; background-size:16px 16px; display:block; width:26px; height:26px; -webkit-transition:.4s ease; -moz-transition:.4s ease; -ms-transition:.4s ease; -o-transition:.4s ease; transition:.4s ease } .btn-rotate span { -webkit-transform:rotate(-135deg); -moz-transform:rotate(-135deg); -ms-transform:rotate(-135deg); -o-transform:rotate(-135deg); transform:rotate(-135deg) } </style> </head> <body> <!-- 代碼 開始 --> <div id="outer_container" class="outer_container" > <a class="menu_button" href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" title="Toggle"><span>Menu Toggle</span></a> <ul class="menu_option"> <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank"><span>Item</span></a></li> <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank"><span>Item</span></a></li> <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank"><span>Item</span></a></li> <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank"><span>Item</span></a></li> <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" target="_blank"><span>Item</span></a></li> </ul> </div> <!-- 代碼 結(jié)束 --> <script> function PieMenuInit(){ $('#outer_container').PieMenu({ 'starting_angel':0, //起始角度 'angel_difference' : 90, //散開角度 'radius':100, //圓形弧度 }); } $(function() { PieMenuInit(); }); </script> </body>
以上所述是小編給大家介紹的基于jQuery代碼實(shí)現(xiàn)圓形菜單展開收縮效果,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
jquery.validate 自定義驗(yàn)證方法及validate相關(guān)參數(shù)
jquery.validate是一個(gè)基于jquery的非常優(yōu)秀的驗(yàn)證框架,我們可以通過它迅速驗(yàn)證一些常見的輸入,并且可以自己擴(kuò)充自己的驗(yàn)證方法,而且對(duì)國(guó)際化也有非常好的支持,通過本文給大家介紹jquery.validate 自定義驗(yàn)證方法及validate相關(guān)參數(shù),需要的朋友一起學(xué)習(xí)吧2016-01-01分享精心挑選的12款優(yōu)秀jQuery Ajax分頁(yè)插件和教程
在這篇文章中,我為大家收集了12個(gè)基于 jQuery 框架的 Ajax 分頁(yè)插件,這些插件都提供了詳細(xì)的使用教程和演示2012-08-08jquery圖片放大功能簡(jiǎn)單實(shí)現(xiàn)
圖片放大在某些例如商品細(xì)節(jié)放大圖比較常見,本文寫了一個(gè)圖片放大的示例適合日常應(yīng)付,有需求的朋友可以參考下2013-08-08jquery+ajax實(shí)現(xiàn)上傳圖片并顯示上傳進(jìn)度功能【附php后臺(tái)接收】
這篇文章主要介紹了jquery+ajax實(shí)現(xiàn)上傳圖片并顯示上傳進(jìn)度功能,結(jié)合實(shí)例形式分析了jQuery+ajax結(jié)合layer.js插件與php后臺(tái)交互,實(shí)現(xiàn)顯示上傳進(jìn)度的相關(guān)操作技巧,需要的朋友可以參考下2019-06-06jQuery實(shí)現(xiàn)導(dǎo)航高亮的方法【附demo源碼下載】
這篇文章主要介紹了jQuery實(shí)現(xiàn)導(dǎo)航高亮的方法,涉及針對(duì)鼠標(biāo)事件的相應(yīng)及頁(yè)面元素屬性動(dòng)態(tài)變換的相關(guān)操作技巧,并附帶demo源碼供讀者下載,需要的朋友可以參考下2016-11-11批量修改標(biāo)簽css樣式以input標(biāo)簽為例
本節(jié)主要介紹了jquery如何批量修改標(biāo)簽css樣式以input標(biāo)簽為例,需要的朋友可以參考下2014-07-07jquery中實(shí)現(xiàn)時(shí)間戳與日期相互轉(zhuǎn)換
本文主要利用jquery擴(kuò)展寫了一個(gè)myTime對(duì)象,并寫了2個(gè)函數(shù)分別處理日期和時(shí)間戳之間的相互轉(zhuǎn)換。2016-04-04jQuery EasyUI API 中文文檔 DateTimeBox日期時(shí)間框
jQuery EasyUI API 中文文檔 DateTimeBox日期時(shí)間框,需要的朋友可以參考下。2011-10-10jquery+css實(shí)現(xiàn)側(cè)邊導(dǎo)航欄效果
這篇文章主要為大家詳細(xì)介紹了jquery+css實(shí)現(xiàn)側(cè)邊導(dǎo)航欄效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-06-06jQuery+CSS實(shí)現(xiàn)的標(biāo)簽頁(yè)效果示例【測(cè)試可用】
這篇文章主要介紹了jQuery+CSS實(shí)現(xiàn)的標(biāo)簽頁(yè)效果,涉及基于jQuery的事件綁定、頁(yè)面元素屬性動(dòng)態(tài)操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2018-08-08