<!DOCTYPE html>
<style>
* {
margin: 0;
padding: 0;
}
span {
display: inline-block;
width: 100px;
height: 100px;
}
#span2 {
transform-origin: 20% 30%;
transform: rotate(90deg) translate(-20px, -30px) translate(0px, 100px) rotate(90deg) translate(5px, -10px);
}
</style>
<span>span1</span>
<span id="span2">span2</span>
<span>span3</span>