JSFiddle - React, Tailwind, and code Playground
by id0
HTML
<div class="wrap">
<p class="em">
em-sized
<span class="resized-text">
resized text
<br>new line
</span>
</p>
<p class="px">
pixel-sized
<span class="resized-text">
resized text
<br>new line
</span>
</p>
<p class="p">
percent-sized
<span class="resized-text">
resized text
<br>new line
</span>
</p>
</div>
CSS
.wrap {
font-size: 14px;
width: 90%;
}
.wrap p {
padding: 10px 20px;
height: 50px;
margin: 10px;
background: #eee;
display: inline-block;
line-height: 3;
border: solid 1px #555;
border-radius: 5px;
}
.em {
font-size: 28px;
}
.px {
font-size: 2em;
}
.p {
font-size: 200%;
}
.resized-text {
font-size: .8em;
}