jQuery右下角旋轉(zhuǎn)環(huán)狀菜單特效代碼
jquery實(shí)現(xiàn)右下角旋轉(zhuǎn)環(huán)形菜單特效代碼,是固定在頁面右下角位置,當(dāng)用戶點(diǎn)擊了主菜單按鈕后,子菜單項(xiàng)會(huì)以環(huán)狀旋轉(zhuǎn)進(jìn)入頁面,并使用animate.css制作動(dòng)畫效果。
效果圖如下:

html代碼:
<div class="htmleaf-container"> <div id='ss_menu'> <div> <i class="fa fa-qq"></i> </div> <div> <i class="fa fa-weibo"></i> </div> <div> <i class="fa fa-weixin"></i> </div> <div> <i class="fa fa-renren"></i> </div> <div class='menu'> <div class='share' id='ss_toggle' data-rot=''> <div class='circle'></div> <div class='bar'></div> </div> </div> </div> </div>
js代碼:
$(document).ready(function (ev) {
var toggle = $('#ss_toggle');
var menu = $('#ss_menu');
var rot;
$('#ss_toggle').on('click', function (ev) {
rot = parseInt($(this).data('rot')) - 180;
menu.css('transform', 'rotate(' + rot + 'deg)');
menu.css('webkitTransform', 'rotate(' + rot + 'deg)');
if (rot / 180 % 2 == 0) {
toggle.parent().addClass('ss_active');
toggle.addClass('close');
} else {
toggle.parent().removeClass('ss_active');
toggle.removeClass('close');
}
$(this).data('rot', rot);
});
menu.on('transitionend webkitTransitionEnd oTransitionEnd', function () {
if (rot / 180 % 2 == 0) {
$('#ss_menu div i').addClass('ss_animate');
} else {
$('#ss_menu div i').removeClass('ss_animate');
}
});
});
- jQuery實(shí)現(xiàn)圖像旋轉(zhuǎn)動(dòng)畫效果
- 基于jQuery插件實(shí)現(xiàn)環(huán)形圖標(biāo)菜單旋轉(zhuǎn)切換特效
- jQuery+CSS3實(shí)現(xiàn)3D立方體旋轉(zhuǎn)效果
- jQuery制作圖片旋轉(zhuǎn)效果
- jQuery實(shí)現(xiàn)炫麗的3d旋轉(zhuǎn)星空效果
- jquery實(shí)現(xiàn)LED廣告牌旋轉(zhuǎn)系統(tǒng)圖片切換效果代碼分享
- jQuery實(shí)現(xiàn)的模仿雨滴下落動(dòng)畫效果
- jQuery實(shí)現(xiàn)數(shù)字自動(dòng)增加或者減少的動(dòng)畫效果示例
- jQuery實(shí)現(xiàn)切換頁面過渡動(dòng)畫效果
- jQuery實(shí)現(xiàn)點(diǎn)擊旋轉(zhuǎn),再點(diǎn)擊恢復(fù)初始狀態(tài)動(dòng)畫效果示例
相關(guān)文章
JavaScript實(shí)現(xiàn)短信倒計(jì)時(shí)60s
本文給大家分享一段實(shí)例代碼給大家詳細(xì)介紹了JavaScript實(shí)現(xiàn)短信倒計(jì)時(shí)60s功能,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友參考下吧2017-10-10
利用Three.js實(shí)現(xiàn)3D三棱錐立體特效
Three.js是基于原生WebGL封裝運(yùn)行的三維引擎,在所有WebGL引擎中,Three.js是國內(nèi)文資料最多、使用最廣泛的三維引擎。本文將用Three.js實(shí)現(xiàn)3D三棱錐立體特效,感興趣的可以了解一下2022-06-06
JS提示:Uncaught SyntaxError: Unexpected token ILLEGAL錯(cuò)誤的解決方法
這篇文章主要介紹了JS提示:Uncaught SyntaxError: Unexpected token ILLEGAL錯(cuò)誤的解決方法,涉及針對(duì)字符串參數(shù)的處理方法,需要的朋友可以參考下2016-08-08
JavaScript sort數(shù)組排序方法和自我實(shí)現(xiàn)排序方法小結(jié)
這篇文章主要介紹了JavaScript sort數(shù)組排序方法和自我實(shí)現(xiàn)排序方法小結(jié)的相關(guān)資料,非常不錯(cuò)具有參考借鑒價(jià)值,需要的朋友可以參考下2016-06-06
js實(shí)現(xiàn)延時(shí)加載Flash的方法
這篇文章主要介紹了js實(shí)現(xiàn)延時(shí)加載Flash的方法,較為詳細(xì)的分析了通過元素替換實(shí)現(xiàn)JavaScript延時(shí)加載flash的相關(guān)原理與實(shí)現(xiàn)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-11-11
asp.net下利用js實(shí)現(xiàn)返回上一頁的實(shí)現(xiàn)方法小集
其實(shí)要實(shí)現(xiàn)這個(gè)功能主要還是要用到j(luò)avascript2009-11-11

