web app 可設置字體 大 中 小 的時候都使用什么方式來改變整個頁面的字體大?。?/p>
使用rem的話,只在字體上使用? 還是全部元素涉及尺寸都使用rem?
走同樣的路,發(fā)現不同的人生
What unit should be used to define the font size of the page in the Web is still hotly debated today. Some people say that PX is a good unit, some say that EM has many advantages, and some are saying that percentage is convenient. There is a PK situation like CSS Font-Size: em vs. px vs. pt vs. percent. Unfortunately, there are still different pros and cons that make each technique less than ideal but still hard not to use. But the emergence of rem seems to make the situation a little better. You can take a look at the differences between rem, em and px. CSS3 REM sets the font size
When I develop, I usually use rem. For individual smaller icons, px is used. If em is used, you need to consider the inheritance of the parent element, which is more commonly used abroad.