.XX {
position: relative;
width: 100px;
height: 100px;
border: 1px solid red;
}
.imageOne {
z-index: 0;
background: blue;
transform: rotate(30deg);
.imageTwo {
z-index: 1;
background: red;
margin-top: -100px;
margin-left: 10px;