Edit in JSFiddle

<div class="container">
<div class="block">
  <div class="square">
  
  </div>
</div>
<div class="block">
  <div class="square">
  
  </div>
</div>
<div class="block">
  <div class="square">
  
  </div>
</div>
<div class="block">
  <div class="square">
  
  </div>
</div>
<div class="block">
  <div class="square">
  
  </div>
</div>
</div>
html, body {
  height: 100%;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
}
.block {
    border: 1px dashed black;
    width: 150px;
    height: 50px;
    transform-origin: 100% 26px;
    transform: rotate(0deg);
    position: absolute;
}
.block:nth-child(1) {
  transform: rotate(45deg);
}
.block:nth-child(2) {
  transform: rotate(90deg);
}
.block:nth-child(3) {
  transform: rotate(135deg);
}
.block:nth-child(4) {
  transform: rotate(180deg);
}
.square {
  background: yellow;
  border: 1px solid black;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}