[英]Angular Material Transparent Toolbar
我在rails應用程序上使用角度材質,希望工具欄位於圖像頂部並使工具欄清晰,以便您可以看到它背后的圖像。 這是迄今為止的代碼:
<div layout="column" layout-fill>
<div layout="row">
<img src="http://www.outsideonline.com/sites/default/files/styles/full-page/public/yosemite-smart-black-bear_h.jpg?itok=kKS8ILd9">
<md-toolbar id="toolbar" class="transparent">
<div class="md-toolbar-tools">
<span>Turbo Mortgages</span>
<!-- fill up the space between left and right area -->
<span flex></span>
<md-button ui-sref="app.register"
aria-label="Toggle Mobile Navigation">
About
</md-button>
<md-button ui-sref="app.join"
aria-label="Toggle Mobile Navigation">
Join
</md-button>
<md-button ui-sref="app.login"
aria-label="Toggle Mobile Navigation">
Login
</md-button>
</div>
</md-toolbar>
</div>
<md-content>
<ng-view></ng-view>
</md-content>
而我現在在頁面上看到的只是圖像...這里是css:
#toolbar {
position:relative;
z-index:1000;
}
如果沒有z-index,如何讓工具欄放在圖像上? 感謝幫助!
我最終使圖像成為工具欄的背景......你也可以設置
position: absolute
background-color:transparent
在工具欄上將其放在圖像上
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.