Размер шрифта уменьшается в зависимости от ширины и высоты div, размер которого является фиксированным - PullRequest
0 голосов
/ 09 мая 2019

У меня есть один div, размер которого фиксирован. div содержит некоторый динамический текст, размер которого увеличивается в соответствии с моими настройками. Теперь я хочу дать динамический уменьшающий размер шрифта, потому что иногда размер текста велик, поэтому текст выходит за пределы этого div.

, поэтому у меня много поиска и я использую также плагин fitText, но не могу дать желаемого результата.

.fix {
  width: 500px;
  height: 500px;
  border: 2px solid black;
}
<div class=fix>

  <p>
  
  <h2>
  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
  
  </h2>
  
  </p>
  
</div>
...