1.页面布局如下:
<div class="headerInfo" >
<van-image class="avator" round width="80" height="80" src="https://..." />
<div>Hello kity</div>
<div class="member">黄金会员</div>
</div>
2.css样式(.member未生效):
.headerInfo {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items :center;
.avator {
position: absolute;
top: -50px;
.member { //未生效
font-size: 10px;
font-weight: bold;
color: #e7a16b;
}
}
}
问题:同级别的class="member"
为什么不生效?
但凡你用个带格式化功能的 IDE 或者编辑器都不会来这问……
到底是“兄弟”还是“父子”?