Ask*_*ous 6 html css material-design angular-material
我正在尝试在我的网络应用程序的右下角实现FAB .手动CSS是唯一的方法吗?我在https://material.angularjs.org上没有看到任何相关文档.
这是我想要实现的示例(右下角的红色按钮):
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.
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)
| 归档时间: |
|
| 查看次数: |
6945 次 |
| 最近记录: |