Let's look at the following example
@font-face { font-family: B; src: url('A.ttf'); } .f { font-family: 'B'; }
<ul> <li class="f" style="font weight: 600;">600 Lao Li next door</li> <li class="f" style="font weight: 500;">500 Lao Li next door</li> <li class="f" style="font weight: 400;">400 Lao Li next door</li> <li class="f" style="font weight: 300;">300 Lao Li next door</li> </ul>
As a result, the font thickness we see is the same
next Have something different
@font-face { font-family: A; src: url('A-B.ttf'); font-weight: 600; } @font-face { font-family: A; src: url('A-M.ttf'); font-weight: 500; } @font-face { font-family: A; src: url('A-R.ttf'); font-weight: 400; } @font-face { font-family: A; src: url('A-L.ttf'); font-weight: 300; } .ff { font-family: 'A'; }
We apply the following HTML code
<ul> <li class="ff" style="font weight: 600;">600 Lao Li next door</li> <li class="ff" style="font weight: 500;">500 Lao Li next door</li> <li class="ff" style="font weight: 400;">400 Lao Li next door</li> <li class="ff" style="font weight: 300;">300 Lao Li next door</li> </ul>
Different thickness effects appear