angularjs - 布局结构 - 带有 angularjs md 的卡片布局和工具栏

标签 angularjs material-design angular-material

我如何使用AngularJS Material Design lib实现官方Layout structure guideline中描述的页面结构并在下面的屏幕截图中举例说明?我想让集中卡打破页面工具栏的边缘。 Codepen 示例将不胜感激。

编辑:相关线程:Angular Material Design layout

enter image description here

最佳答案

我想我会发布这个来帮助其他人尝试使用 Materialize CSS 做同样的事情。您可以更改导航栏的高度以及卡片的大小/位置。

enter image description here

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>
              &nbsp;
                  <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/

相关文章:

javascript - Angularjs 焦点意外地需要异步 setTimeout 才能工作

android - 为什么Android 7.1中有roundedIcon属性

android - 如何使用 Android 色板

angular-material - Angular Material 与 bootstrap 框架类似吗?

javascript - jQuery scrollTo 仅在 Chrome 61 之后有效

javascript - 不能使用字母 x 开始 Angular 中的 html 属性

javascript - 使用具有全局值的 Javascript Replace() 时 ng-bind-html 会中断

javascript - ng-model 具有字符串值和 ng-option 整数

javascript - 在 reactjs Material ui 进度条中显示百分比数

html - Angular MatMenu : highlighting active item