如何在许多Google网络应用中看到,如何在右下方实施"添加"FAB?

Ask*_*ous 6 html css material-design angular-material

我正在尝试我的网络应用程序的右下角实现FAB .手动CSS是唯一的方法吗?我在https://material.angularjs.org上没有看到任何相关文档.

这是我想要实现的示例(右下角的红色按钮):

FAB在右下方添加按钮

Ask*_*ous 11

我刚刚找到了答案:

<md-button class="md-fab md-fab-bottom-right" aria-label="Add a category">
  <md-icon>add</md-icon>
</md-button>
Run Code Online (Sandbox Code Playgroud)

我不得不添加一个类名md-fab-bottom-right.


Gab*_*hez 9

CSS 的主要规则是“正确”;为了添加到 Luis 的答案中,将此规则添加到 CSS:

.md-fab-bottom-right{
    position: fixed !important;
    right: 15px; /* Add this and change value to set the margin you want */
}
Run Code Online (Sandbox Code Playgroud)