[科技]基于jQuery環形圖標菜單旋轉切換特效
分享一款基于jQuery環形圖標旋轉切換特效。這是一款鼠標點擊圖標菜單圓形順時針或者逆時針旋轉切換代碼。效果圖如下:
實現的代碼。
js代碼:
/* 圖片地址可以是相對路徑或絕對路徑;標題和描述可以包含HTML */ var settings = [ {image: 'images/zzsc1.png', heading: '愛編程', description: 'www.w2bc.com'}, { image: 'images/zzsc2.png', heading: '愛編程', description: 'www.w2bc.com' }, { image: 'images/zzsc3.png', heading: '愛編程', description: 'www.w2bc.com' }, { image: 'images/zzsc4.png', heading: '愛編程', description: 'www.w2bc.com' }, { image: 'images/zzsc5.png', heading: '愛編程', description: 'www.w2bc.com' }, { image: 'images/zzsc6.png', heading: '愛編程', description: 'www.w2bc.com' } ]; var options = { circle_radius: 220, normal_feature_size: 100, highlighted_feature_size: 150, top_margin: 100, bottom_margin: 50, spacing: 40, min_padding: 50, heading_font_size: 30, description_font_size: 20, type: 'image' }; var fp = new FeaturePresenter($("#test-element"), settings, options); fp.createPresenter();