.two overrides .one according to the code here. if we remove the transform: translateY(-40px), .one overrides .two accordingly. What makes the transform: translateY(-40px) in .two to override the .one which didn't happen before applying the transform property.
div {
width: 150px;
height: 150px;
display: inline-block;
}
.one {
background: red;
transform: translateX(50%);
}
.two {
background: green;
transform: translateY(-40px);
}
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>