前端只需引用:
1 2 | < link href = "js/floating.css" rel = "stylesheet" type = "text/css" > < script src = "css/floating.js" ></ script > |
js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | <script> $(document).ready( function () { $( "body" ).floating({ "theme" : "panel_theme_fillet_Blacktheme" , "state" : true , "moveState" : true , "size" : "sm" , "position" : "right-center" , "tip" : { "background-color" : "#f20000" , "color" : "#efb2b2" }, "account" : [{ "type" : "Email" , "tip" : null , "text" : null , "url" : "mailto:null" }, { "type" : "Phone" , "tip" : null , "text" : null , "url" : "tel:null" }, { "type" : "Skype" , "tip" : null , "text" : null , "url" : "skype:null?chat" }, { "type" : "WhatsApp" , "tip" : null , "text" : null , }, { "type" : "Viber" , "tip" : null , "text" : null , }, { "type" : "QRcode" , "text" : null , "url" : null }, { "type" : "Top" , "tip" : "Back top" , "text" : null , "url" : null }, { "type" : "QQ" , "tip" : null , "text" : "213123" , }] }); }) < </script> |
json:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | var initialize = { theme: "panel_theme_round_solid" , //主题 state: true , //PC moveState: true , //移动 size: "auto" , //尺寸 position: "right-center" , //展示位置 tip: { "background-color" : "#000" , "color" : "#fff" }, //提示层的样式 account: [ //悬浮部件 { type: "Email" , tip: "" , text: "" , url: "" }, { type: "Phone" , tip: "" , text: "" , url: "" }, { type: "Skype" , tip: "" , text: "" , url: "" }, { type: "WhatsApp" , tip: "" , text: "" , url: "" }, { type: "Viber" , tip: "" , text: "" , url: "" }, { type: "QRcode" , }, { type: "Top" , tip: "Back top" } ] }; |
后台编辑器插件为任务需求编写封装,
1 | $( "body" ).floatmodel(initialize); |
后台编辑器获取组合好的前端悬浮JSON: 获取JSON:
1 | $( "body" ).floatmodel( "get" ); |
前端调用:
1 | $( "body" ).floating(initialize); |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com