所以我试图移动一个带有背景图像的子div,但无论我设置多少都没有移动,这是我在html中的代码:
<div className="review-dots-container">
<div className="review-dots-purple" />
</div>
和我的css:
.review-dots-container {
width: 100%;
height: 100%;
position: relative;
.review-dots-purple {
background-image: url('./scss/img/dots-purple@1x.png');
height: 368.08px;
width: 368.12px;
position: absolute;
background-position: 70% 80%;
@include mediaQuery(768px) {
height: 368.08px;
width: 112px;
}
}
}
所以父级继承了宽度和高度,它与子div相对,背景图像定位为绝对,但无论我设置多少,图像都不会移动到任何地方,即使它&# 39; S
background-position: 120% 180%;