mui原生渐变式导航5+

<script type="text/javascript">
            mui.init({
                statusBarBackground: '#f7f7f7',
                preloadPages: [ {
                    url: "../pages/contacts/contact.html",
                    id: "contact.html"
                }],
            });
            mui.plusReady(function() {

                document.getElementById('contact').addEventListener('tap', function() {
        //常规方式方法打开是不会有原生效果的 可以使用预加载
                    //                  mui.openWindow({
                    //                      url: '../pages/contacts/contact.html',
                    //                      id: 'contact.html',
                    //                      show: {
                    //                          autoShow: true, //页面loaded事件发生后自动显示,默认为true
                    //                          //    aniShow:animationType,//页面显示动画,默认为”slide-in-right“;
                    //                          //    duration:animationTime,//页面动画持续时间,Android平台默认100毫秒,iOS平台默认200毫秒;
                    //                          //    event:'titleUpdate',//页面显示时机,默认为titleUpdate事件时显示
                    //                          //    extras:{}//窗口动画是否使用图片加速
                    //                      },
                    //                  });

                    //5+方法 不使用预加载  仅5+创建webview 事件发生前创建
                   var webview = plus.webview.create("../pages/contacts/contact.html",    "contact.html", {
                        titleNView: {
                            'backgroundColor': '#f7f7f7', //导航栏背景色
                            'titleText': '透明渐变(native模式)', //导航栏标题
                            'titleColor': '#000000', //文字颜色
                            type: 'transparent', //透明渐变样式
                            autoBackButton: true, //自动绘制返回箭头
                            splitLine: { //底部分割线
                                color: '#cccccc'
                            }
                        }
                    }, {});//不能放到事件外面
                    //5+打开跳转
                    webview.show("slide-in-right", 300); //直接显示
                });
            })
        </script>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值