zoukankan      html  css  js  c++  java
  • 侧面板panel

    实例:

    <!-- Panels overlay-->
    <div class="panel-overlay"></div>
    <!-- 左侧面板 -->
    <div class="panel panel-left panel-reveal">
        <div class="content-block">
            <p><a href="#" class="close-panel">关闭面板</a></p>
        </div>
    </div>
    <!-- 右侧面板 -->
    <div class="panel panel-right panel-cover">
        <div class="content-block">
            <p><a href="#" class="close-panel" data-panel="right">关闭面板</a></p>
        </div>
    </div>

    左侧面板:panel-left

    右侧面板:panel-right

    推出面板:panel-reveal

    覆盖:panel-cover

    关闭面板:close-panel

    方法:myApp.openPanel('left[right]')

    事件:

    var myApp = new Framework7();

    var $$ = Dom7;

    $$('.panel-left').on('opened', function () { myApp.alert('Left panel opened!'); });

    滑动推出面板需要配置初始化参数,但只能设置一边:swipePanel: 'left[right]'

    判断侧边栏是否打开:

    • 如果你有带Cover效果的左侧栏打开着,body会有“with-panel-left-cover”类 <body class="with-panel-left-cover">

    • 如果你有带Reveal效果的左侧栏打开着, body 会有“with-panel-left-reveal”类 <body class="with-panel-left-reveal">

    • 如果你有带Cover效果的右侧栏打开着,body会有"with-panel-right-cover" 类 <body class="with-panel-right-cover">

    • 如果你有带Reveal效果的右侧栏打开着, body 会有"with-panel-right-reveal" 类 <body class="with-panel-right-reveal">

    判断if ($$('body').hasClass('with-panel-left-cover')) { console.log('Left Panel is opened') }

  • 相关阅读:
    关于ios8斯坦福公开课第二课
    关于cocoapods和swift中使用oc第三方
    swift 关于闭包和函数
    同步、异步请求
    AFNETWORKING tabelView没有reloadData,报错unsupported URL
    在模型中获取网络数据,刷新tableView
    界面随键盘顶起来
    Java并发编程:线程池的使用
    比较好的介绍线程池的文章
    一篇很不错的dubbo学习文章
  • 原文地址:https://www.cnblogs.com/zhenxianluo/p/framework7.html
Copyright © 2011-2022 走看看