【发布时间】:2018-03-30 23:38:25
【问题描述】:
我正在为这个东西使用有角度的材料标签。我的代码如下所示:
<md-tab-group>
<md-tab style="position: fixed;top:0;" label={{category}} *ngFor="let category of itemCategory">
</md-tab>
</md-tab-group>
而css就是:
.q-header {
width: 100%;
height: 40px;
display: flex;
flex-direction: row;
position: fixed;
top: 0px;
transform: translateZ(0);
-webkit-transform: translateZ(0);
align-items: center;
padding-left: 10px;
z-index: 100000000;
/*justify-content: center;*/
color: white;
background-color: #42AB9E;
}
但不知何故,标签在滚动时不会保持固定。我怎样才能做到这一点?
【问题讨论】:
-
您使用的是哪个 AM 版本?
-
@Vega
"2.0.0-beta.11 -
这是一个特定的选择吗?最新版本遥遥领先
-
几个月前我集成了它,当时这是最新的。