What are cons to use % over em in terms of accessibility?
What are cons to use % over em in t开发者_如何学运维erms of accessibility?
I don't think there are any any more.
In the olden days, internet explorer wouldn't let you zoom a page if sizes were specified in pixels, but would if in em or %. This led to the recommendation to stay away from pixels in order to allow users to view content at a size useful for them.
Nowadays, all modern browsers do a full page zoom, irrespective of what units you use to size things in, so basically it's up to you.
I often use pixels when things need to be perfectly lined up, and em when sizing fonts and paragraph margins etc to keep a vertical rhythm.
% over em?
I would say no advantage concerning accessibility as far as I know, but I would say it is hard to switch from one to the other.
Isn't '%' a relational size, whereas 'em' is an absolute size? The one is for liquid layouts, the other isn't...
精彩评论