Material Design精简菜单

时间:2016-07-27 21:47:04

标签: html css material-design

我正在使用材料设计精简版。

在我的仪表板菜单中,我试图显示4个标签。

我尝试过多种方式在我的信息中心网址上显示4个标签。

这是我的仪表板菜单---

https://codepen.io/anon/pen/pbKVko

<html>
  <head>
    <!-- Material Design Lite -->
    <script src="https://code.getmdl.io/1.1.3/material.min.js"></script>
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css">
    <!-- Material Design icon font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  </head>
  <body>
    <!-- Uses a header that scrolls with the text, rather than staying
      locked at the top -->
    <div class="mdl-layout mdl-js-layout">
      <header class="mdl-layout__header mdl-layout__header--scroll">
        <div class="mdl-layout__header-row">
          <!-- Title -->
          <span class="mdl-layout-title">Chris</span>
          <!-- Add spacer, to align navigation to the right -->
          <div class="mdl-layout-spacer"></div>
          <!-- Navigation -->
          <nav class="mdl-navigation">
            <a class="mdl-navigation__link" href="">Dashboard</a>
            <a class="mdl-navigation__link" href="">Dashboard 2</a>
            <a class="mdl-navigation__link" href="">Dashboard 3</a>
            <a class="mdl-navigation__link" href="">Dashboard 4</a>
          </nav>
        </div>
      </header>
      <div class="mdl-layout__drawer">
        <span class="mdl-layout-title">Chris</span>
        <nav class="mdl-navigation">
            <a class="mdl-navigation__link" href="">Dashboard</a>
            <a class="mdl-navigation__link" href="">Dashboard 2</a>
            <a class="mdl-navigation__link" href="">Dashboard 3</a>
            <a class="mdl-navigation__link" href="">Dashboard 4</a>
        </nav>
      </div>
      <main class="mdl-layout__content">
        <div class="page-content"><!-- Your content goes here --></div>
      </main>
    </div>
  </body>
</html>

这是我的标签菜单,我想在我的仪表板菜单上添加--- https://codepen.io/anon/pen/JKkvgA

任何人都知道我如何合并这个2并仅在仪表板菜单选择上显示4个标签!

任何建议或建议都会非常感激!

1 个答案:

答案 0 :(得分:1)

这个怎么样?

<html>
  <head>
    <!-- Material Design Lite -->
    <script src="https://code.getmdl.io/1.1.3/material.min.js"></script>
    <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css">
    <!-- Material Design icon font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
  </head>
  <body>
    <!-- Uses a header that scrolls with the text, rather than staying
      locked at the top -->
    <div class="mdl-layout mdl-js-layout">
      <header class="mdl-layout__header mdl-layout__header--scroll">
        <div class="mdl-layout__header-row">
          <!-- Title -->
          <span class="mdl-layout-title">Chris</span>
          <!-- Add spacer, to align navigation to the right -->
          <div class="mdl-layout-spacer"></div>
          <!-- Navigation -->
          <nav class="mdl-navigation">
            <a class="mdl-navigation__link" href="">Dashboard</a>
            <a class="mdl-navigation__link" href="">Dashboard 2</a>
            <a class="mdl-navigation__link" href="">Dashboard 3</a>
            <a class="mdl-navigation__link" href="">Dashboard 4</a>
          </nav>
        </div>
        <!-- Tabs -->
        <div class="mdl-layout__tab-bar mdl-js-ripple-effect">
            <a href="#dashboard_tab_1" class="mdl-layout__tab is-active">Dashboard Tab 1</a>
            <a href="#dashboard_tab_2" class="mdl-layout__tab">Dashboard Tab 2</a>
            <a href="#dashboard_tab_3" class="mdl-layout__tab">Dashboard Tab 3</a>
            <a href="#dashboard_tab_4" class="mdl-layout__tab">Dashboard Tab 4</a>
        </div>
      </header>
      <div class="mdl-layout__drawer">
        <span class="mdl-layout-title">Chris</span>
        <nav class="mdl-navigation">
            <a class="mdl-navigation__link" href="">Dashboard</a>
            <a class="mdl-navigation__link" href="">Dashboard 2</a>
            <a class="mdl-navigation__link" href="">Dashboard 3</a>
            <a class="mdl-navigation__link" href="">Dashboard 4</a>
        </nav>
      </div>
      <main class="mdl-layout__content">
        <div class="page-content"><!-- Your content goes here --></div>
      </main>
    </div>
  </body>
</html>