我如何使用AngularJS Material Design lib实现官方Layout structure guideline中描述的页面结构并在下面的屏幕截图中举例说明?我想让集中卡打破页面工具栏的边缘。 Codepen 示例将不胜感激。
编辑:相关线程:Angular Material Design layout
最佳答案
我想我会发布这个来帮助其他人尝试使用 Materialize CSS 做同样的事情。您可以更改导航栏的高度以及卡片的大小/位置。
Demo
HTML
<nav>
<div class="nav-wrapper">
<a href="#" class="brand-logo left"><i class="material-icons">list</i></a>
</div>
<div class="nav-wrapper">
</div>
</nav>
<
<<div class="row" id="card-placement"> <!-- id added here -->
<div class="col s12 m8 offset-m2">
<div class="card grey lighten-5">
<div class="card-content grey-text text-darken-1">
<h5 class="head">Title</h5> <!-- class added here -->
<div class="divider"></div>
<p>Stuff goes here</p>
</div>
</div>
</div>
</div>
CSS
/* Moves card up into navbar */
#card-placement{
margin-top:-60px
}
/* Moves Title position up to be level with nav bottom */
.head {
margin-top: -2px;
}
nav {
color: #fff;
background-color: #ee6e73;
width: 100%;
height: 112px;
line-height: 56px;
}
.nav-wrapper {
margin-left: 20px;
}
关于angularjs - 布局结构 - 带有 angularjs md 的卡片布局和工具栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30036920/