0

ブラウザのデフォルトの font-size が 16px であることを理解しました。では、インラインブロックの高さ (12px) がフォントサイズと同じなのはなぜですか (Chrome と FF で試しました)。理解を助けてください。ありがとうございました。

<!DOCTYPE html>
<html>
<head>
    <style>
        body {
            font: 100% helvetica, arial, sans-serif;
            line-height: 1.625;
        }
        #tempTest {
            display: inline-block;
            width: 10px;
            height: 12px;
            background-color: orange;
        }
    </style>
</head>
<body>
<p class="heading"><span id="tempTest"></span>Remember, when you were young, you shone like a sun. Shine on you crazy diamond</p>
</body>
</html>
4

1 に答える 1