bootstrap responsive text code example
Example 1: responsive font-size
font-size: clamp(40px, 10vw, 70px);
Example 2: how to make fonts respnsive
h1 {
font-size: clamp(16px, 5vw, 34px);
}
Example 3: responsive text css
@media screen and (min-width: 25em){
html { font-size: calc( 16px + (24 - 16) * (100vw - 400px) / (800 - 400) ); }
}
@media screen and (min-width: 25em){
html { font-size: calc( 16px + (24 - 16) * (100vw - 400px) / (800 - 400) ); }
}
@media screen and (min-width: 50em){
html { font-size: calc( 16px + (24 - 16) * (100vw - 400px) / (800 - 400) ); }
}
Example 4: how to make font responsive
html { font-size: calc(1em + 1vw); }
Example 5: bootstrap 4 responsive paragraph
<p class="lead">
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
</p>