容器查询宽度处于活动状态,但高度不工作
#box {
container: box/inline-size;
height: 200px;
}
@container box (height > 50px) {
/* not work */
article {
background: skyblue ;
}
}
@container box (width > 50px) {
/* it works */
article {
color: blue;
}
}
Height:容器的高度,以值表示. Width:容器的宽度,以值表示. 这是MDN的派生
我认为演示没有问题,它应该能够根据高度动态显示背景 colored颜色