sam*_*mkj 5 html css material-design-lite
我尝试设置边距,填充以将后箭头图标移动到标题的左侧但是失败了.我应该如何做到这一点?
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<!--back arrow-->
<button class="mdl-button mdl-js-button mdl-button--icon" onclick="history.go(-1);">
<i class="material-icons">arrow_back</i>
</button>
<!--Title-->
<span class="mdl-layout-title">Settings</span>
</div>
<!-- Tabs -->
<div class="mdl-layout__tab-bar mdl-js-ripple-effect">
<a href="{{pathFor route='home'}}" class="mdl-layout__tab">Profile</a>
<a href="{{pathFor route='settings'}}" class="mdl-layout__tab">Account</a>
</div>
Run Code Online (Sandbox Code Playgroud)
后退按钮我遇到了同样的问题.文档中没有可视化演示,但阅读文档后我找到了正确的方法:只需mdl-layout-icon
在按钮上放一个类.
<header class="mdl-layout__header">
<button class="mdl-layout-icon mdl-button mdl-js-button mdl-button--icon" onclick="history.go(-1);">
<i class="material-icons">arrow_back</i>
</button>
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Some title</span>
<div class="mdl-layout-spacer"></div>
</div>
</header>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4376 次 |
最近记录: |