LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

First row
Another row
One third and long row
The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog

CSS
#wrapper > #title {
  width: 80%;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 10px;
  margin: 0 auto;
  color: #e3584d;
  text-shadow: 0 1px 1px #fff;
  padding: 0;
}
JS
function resizeFont(elemToR) {
  var parentW = elemToR.offsetWidth;

  $(elemToR).find('.row').each(function(n) {
    var newFontSize = (parentW / this.offsetWidth) * 9.9;

    this.style.fontSize = newFontSize + 'px';
    this.style.lineHeight = '100%';
  });
}

$(document).ready(function() {
  $('.justify-this').each(function() {
    resizeFont(this);
  });
});

Description

Responsive Text Text that auto-scale to fit the line / row it's in
Term
Fri, 01/12/2018 - 16:43

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv