web app 可设置字体 大 中 小 的时候都使用什么方式来改变整个页面的字体大小?
使用rem的话,只在字体上使用? 还是全部元素涉及尺寸都使用rem?
天蓬老师2017-04-17 11:16:31
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
天蓬老师2017-04-17 11:16:31
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.