我试图创建一个2列的网站和粘性标题,但我的滚动不正常。
index.html索引

<body layout="column">
    <navbar></navbar> <!-- directive header -->
    <ng-view></ng-view> <!-- main view -->
    <foot></foot>     <!-- directive footer-->
</body>

main.html网站
<md-sidenav class="md-sidenav-left" md-component-id="left" md-whiteframe="4">

    <md-toolbar class="md-theme-indigo">
        <h1 class="md-toolbar-tools">Sidenav Left</h1>
    </md-toolbar>
    <md-content layout-padding ng-controller="LeftCtrl">
        <p hide show-gt-md>
            Filters
        </p>
    </md-content>

</md-sidenav>

<md-content flex style="overflow-y:auto">
    <!-- Large text -->
</md-content>

导航栏.html
 <md-toolbar layout="row">
  <button ng-click="toggleSidenav('left')" hide-gt-sm class="menuBtn">
    <span class="visually-hidden">Menu</span>
  </button>
  <h1 class="md-toolbar-tools" layout-align-gt-sm="center">Hello World</h1>
</md-toolbar>

最佳答案

将此添加到您的ng视图,因为您将md内容嵌入其中,

 <ng-view  flex layout="column" style="overflow: scroll;" ></ng-view>

DEMO

关于html - md内容不滚动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39546946/

10-14 17:11
查看更多