HTML
CSS
JavaScript
HTML
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>菜单 - 通过自定义属性调用的级联菜单</title>
  <link rel="stylesheet" href="../assets/mdui-v0.2.1/css/mdui.min.css"/>
</head>
<body class="mdui-theme-primary-indigo mdui-theme-accent-pink">

<div class="mdui-container mdui-p-t-5">
  <button class="mdui-btn mdui-color-theme-accent" mdui-menu="{target: '#demo-attr-cascade'}">cascade menu</button>

  <ul class="mdui-menu mdui-menu-cascade" id="demo-attr-cascade">
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">
        <i class="mdui-menu-item-icon mdui-icon material-icons">&#xe238;</i>
        Bold
        <span class="mdui-menu-item-helper">Ctrl+B</span>
      </a>
    </li>
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">
        <i class="mdui-menu-item-icon mdui-icon material-icons">&#xe23f;</i>
        Italic
        <span class="mdui-menu-item-helper">Ctrl+I</span>
      </a>
    </li>
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">
        <i class="mdui-menu-item-icon"></i>
        Superscript
        <span class="mdui-menu-item-helper">Ctrl+.</span>
      </a>
    </li>
    <li class="mdui-divider"></li>
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">
        Paragraph style
        <span class="mdui-menu-item-more"></span>
      </a>
      <ul class="mdui-menu mdui-menu-cascade">
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon"></i>Single
          </a>
        </li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon"></i>1.15
          </a>
        </li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon"></i>Double
          </a>
        </li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon mdui-icon material-icons">&#xe5ca;</i>Custom: 1.2
          </a>
        </li>
        <li class="mdui-divider"></li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">Add space before paragraph</a>
        </li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">Add space after paragraph</a>
        </li>
        <li class="mdui-divider"></li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">Custom spacing...</a>
        </li>
      </ul>
    </li>
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">
        Line spacing
        <span class="mdui-menu-item-more"></span>
      </a>
      <ul class="mdui-menu mdui-menu-cascade">
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon"></i>
            Single
          </a>
        </li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon"></i>
            1.15
          </a>
        </li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon"></i>
            Double
          </a>
        </li>
        <li class="mdui-menu-item">
          <a href="javascript:;" class="mdui-ripple">
            <i class="mdui-menu-item-icon mdui-icon material-icons">&#xe5ca;</i>
            Custom: 1.2
            <span class="mdui-menu-item-more"></span>
          </a>
          <ul class="mdui-menu mdui-menu-cascade">
            <li class="mdui-menu-item">
              <a href="javascript:;" class="mdui-ripple">
                Line spacing
                <span class="mdui-menu-item-helper">1.2</span>
              </a>
            </li>
            <li class="mdui-menu-item">
              <a href="javascript:;" class="mdui-ripple">
                Paragraph spacing before
                <span class="mdui-menu-item-helper">1.2</span>
              </a>
            </li>
            <li class="mdui-menu-item">
              <a href="javascript:;" class="mdui-ripple">
                Paragraph spacing after
                <span class="mdui-menu-item-helper">1.5</span>
              </a>
            </li>
          </ul>
        </li>
      </ul>
    </li>
  </ul>
</div>

<script src="../assets/mdui-v0.2.1/js/mdui.min.js"></script>
</body>
</html>
CSS

    
JavaScript