如何以SASS样式方式定位父类。在下面的样式中,当父div具有带有“ childclass ”类的子元素时,我想在父div上应用 padding 样式。
parentwrapperclass
{
position: relative;
bottom: 0px;
width: 100%;
& > .childclass{
padding: 0 15px;
}
}
<div class="parentwrapperclass">
<div class="childclass">
</div>
</div>