84

H5 活动页之移动端 REM 布局适配方法 - 志文工作室

 6 years ago
source link: https://lzw.me/a/h5-rem.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
拿到设计稿后,如何进行布局还原? 如果只需要做非精确的响应式设计,那么使用媒体查询来实现就 OK 了。如果需要精确还原设计稿,则一般通过缩放来实现,常见的缩放方案有基于 viewport 和基于 rem 的布局适配方法。 1 viewport 缩放方案 在移动端,可以通过 viewport 缩放页面大小比率达到目的。 简单来说,即所有宽高像素与视觉稿输出相同,然后通过页面宽度与视觉稿的宽度比率,动态设置 viewport。缩放方

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK