|
circularMenu模块(导航菜单)demo示例
[复制链接]
本帖最后由 gigie 于 2017-12-29 17:58 编辑
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title>title</title>
- <link rel="stylesheet" type="text/css" href="../css/api.css" />
- <style>
- body {}
- html,
- body {
- height: 100%
- }
- body {
- background-color: #fff;
- margin: 0;
- }
- a.button {
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-box-pack: center;
- -webkit-box-align: center;
- height: 32px;
- margin: 8px;
- background-color: rgba(240, 240, 240, 1.0);
- border-color: rgba(220, 220, 220, 1.0);
- border-width: none;
- }
- a.active {
- background-color: rgba(240, 240, 240, 0.7);
- }
- </style>
- </head>
- <body>
- <a class="button" tapmode="active" onclick="fnOpen()">打开</a>
- <a class="button" tapmode="active" onclick="fnHide()">隐藏</a>
- <a class="button" tapmode="active" onclick="fnShow()">显示</a>
- <a class="button" tapmode="active" onclick="fnClose()">关闭</a>
- </body>
- <script type="text/javascript" src="../script/api.js"></script>
- <script type="text/javascript">
- var circularMenu;
- apiready = function() {
- circularMenu = api.require('circularMenu');
- };
- function fnOpen() {
- var circularMenu = api.require('circularMenu');
- circularMenu.open({
- items: [{
- normal: 'widget://image/default.jpg',
- highlight: 'widget://image/default.jpg',
- title: '账户明细'
- }, {
- normal: 'widget://image/default.jpg',
- highlight: 'widget://image/default.jpg',
- title: '转账汇款'
- }, {
- normal: 'widget://image/default.jpg',
- highlight: 'widget://image/default.jpg',
- title: '投资理财'
- }, {
- normal: 'widget://image/default.jpg',
- highlight: 'widget://image/default.jpg',
- title: '特色服务'
- }, {
- normal: 'widget://image/default.jpg',
- highlight: 'widget://image/default.jpg',
- title: '安全中心'
- }, {
- normal: 'widget://image/default.jpg',
- highlight: 'widget://image/default.jpg',
- title: '信用卡'
- }],
- centerX: api.frameWidth / 2,
- centerY: api.frameHeight / 2,
- bgImg: 'widget://image/handler.png',
- centerBtnImg: 'widget://image/handler.png',
- fixedOn: api.frameName
- }, function(ret, err) {
- if (ret) {
- alert(JSON.stringify(ret));
- } else {
- alert(JSON.stringify(err));
- }
- });
- }
- function fnHide() {
- circularMenu.hide();
- }
- function fnShow() {
- circularMenu.show();
- }
- function fnClose() {
- circularMenu.close();
- }
- </script>
- </html>
复制代码 circularMenu模块demo展示,附带widget包
|
本帖子中包含更多资源,您需要 登录 才可以下载或查看,没有帐号?立即注册
X
|