Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get font size in javascirpt

const fontSize = window.getComputedStyle(document.getElementById("yourFontSizeinCSS")).fontSize;
const size = parseFloat(fontSize);
document.getElementById("one").style.fontSize = `${size * 3}px`;
 
PREVIOUS NEXT
Tagged: #font #size #javascirpt
ADD COMMENT
Topic
Name
5+3 =