[Vuejs]-Scaling text to fit inside its container

0👍

You could use SVG to scale the text:

.container {
  display: flex;
  justify-content: center;
  resize: both;
  overflow: scroll;
  border: solid 1px;
  width: 200px;
  height: 100px;
}
<div class="container">
  <svg viewBox="0 0 80 20">
    <text x="2" y="15">Hello world</text>
  </svg>
</div>

Leave a comment