HTML
CSS
JavaScript
play_arrow
HTML
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>菜单 - 通过自定义属性调用的简单菜单</title>
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/mdui@1.0.1/dist/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: '#example-attr'}">open</button>
  <ul class="mdui-menu" id="example-attr">
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">Refresh</a>
    </li>
    <li class="mdui-menu-item" disabled>
      <a href="javascript:;">Help & feedback</a>
    </li>
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">Settings</a>
    </li>
    <li class="mdui-divider"></li>
    <li class="mdui-menu-item">
      <a href="javascript:;" class="mdui-ripple">Sign out</a>
    </li>
  </ul>
</div>

<script src="//cdn.jsdelivr.net/npm/mdui@1.0.1/dist/js/mdui.min.js"></script>
</body>
</html>
CSS

  
JavaScript