<div class="both"></div>
<div class="horizontal"></div>
<div class="vertical"></div>
body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
div {
  width: 100px;
  height: 100px;
  margin: 0 1rem;
  overflow: auto;
  &.both {
    resize: both;
    background: #EF476F;
  }
  &.horizontal {
  resize: horizontal;
    background: #FFD166;
}
  &.vertical {
    resize: vertical;
    background: #06D6A0;
  }
}