About em?

body {
    font-size: 20px;
    line-height: 2;
}

.em {
    font-size: 2em;
    background: -sharpccc;
}

how much should the line-height above be in the end?
I"m not sure:
.em inherits the line-height property of body, does it inherit the value of 2? Or do you inherit the calculated 40px?

Jul.04,2021

inherits the attribute 2, that is, 2 * 20 = 40px after calculation. You can query it from the developer's tool:
clipboard.png


.em line-height2bodyline-height40px,.em80px


font-size, font-size, font-size, emfont-size.
line-height:

clipboard.png

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8ca67-5bf0f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8ca67-5bf0f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?