[英]MDL drawer does not fill the height of the page?
我正在使用Material Design Lite向我的Ruby on Rails應用程序添加固定的頁眉和抽屜。 正如您在此視頻中看到的那樣,當我導航到另一頁時,該頁面左側的抽屜菜單未填滿該頁面的高度。
在刷新頁面之前,它一直處於異常高度(即使單擊其他鏈接也是如此)。 有人能弄清楚這里發生了什么嗎? 這是我的應用程序視圖的主體:
<!-- Material design fixed header and drawer -->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer
mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<!-- Add spacer to align search bar to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Search bar -->
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
mdl-textfield--floating-label mdl-textfield--align-right">
<label class="mdl-button mdl-js-button mdl-button--icon"
for="fixed-header-drawer-exp">
<i class="material-icons">search</i>
</label>
<div class="mdl-textfield__expandable-holder">
<input class="mdl-textfield__input" type="text" name="sample"
id="fixed-header-drawer-exp">
</div>
</div>
</div>
</header>
<!-- Drawer menu -->
<div class="mdl-layout__drawer">
<span class="mdl-layout-title"></span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="<%= songs_path %>">Home</a>
<a class="mdl-navigation__link" href="<%= new_song_path %>">Upload</a>
<a class="mdl-navigation__link" href="">About</a>
</nav>
</div>
<!-- Page content -->
<main class="mdl-layout__content">
<div class="page-content"><%= yield %></div>
</main>
</div>
感謝大家!
我有同樣的問題。 只需添加一個
<div class="mdl-layout__container">
在以上所有div中 (不要忘記通過在html末尾添加“ </ div>”來關閉div),我也添加了它,並且也可以使用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.