css - When the font type is changed, the font size changes. So how can I change the font type and keep the font size unchanged?
大家讲道理
大家讲道理 2017-07-05 11:01:59
0
2
2548

The question is this:
There is a paragraph of text, <p>Who am I? </p>
Then I set different font types to adapt to different clients, but when switching font types, the font size will change.
What should I do if I want to keep the font size unchanged when changing the font type?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
淡淡烟草味

I’m not sure what your specific adaptation rules are. Generally, you can write a string of font names in font-family, and the browser will adapt them in order from front to back until it finds the one with the font. Unless you are using web fonts, there is generally no need to use js.

ringa_lee

Do you mean that both fonts are 12px, but one is very large and looks like it is more than 12px, and the other is very small and does not look like 12px? If that's the case, I'm also very confused. Some fonts may be large and some small

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template