【发布时间】:2018-04-16 14:26:04
【问题描述】:
app组件中导航栏的大小在加载不同组件时会不断变化。我想让这个保持不变。
.navbar{
min-height: 50px;
background-color: #e8e8e8;
}
h3{
padding-left: 43%
}
**app.component.html**
<nav class="navbar navbar-default">
<h3>MY Heading</h3>
<a class="active" href="#"><i class="fa fa-home"></i></a>
</nav>
<router-outlet></router-outlet>
基于组件加载的导航栏更改路由器时会调整其大小,并且“我的标题”会缩小大小并显示在两行不同的行中,而不是单行。
我尝试在 Nav Class 的 Css 中使用固定属性,但没有成功。 我错过了什么?
【问题讨论】:
标签: html css twitter-bootstrap angular