1
一个快速问题:scss嵌套,需要重复
为什么我必须重复每个嵌套状态的位置和顶部的第一个弓箭?我认为重点不在重复呢? 如果我删除嵌套类中的状态,它不起作用。
我想使用它们,如:
标志已去左上所以我用top__left为一类,用于菜单即top__right等等
.top {
position: fixed;
top: 2%;
&__left {
position: fixed;
top: 2%;
left: 1%;
}
&__right {
position: fixed;
top: 2%;
right:1%;
}
&__centered {
position: fixed;
left: 50%;
transform: translate(-50%, -50%);
}
}
非常感谢你的回答,它确实有帮助。 – HendrikEng