Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

页面缩放方案选择 #1

Open
Onesimu opened this issue Sep 30, 2019 · 3 comments
Open

页面缩放方案选择 #1

Onesimu opened this issue Sep 30, 2019 · 3 comments

Comments

@Onesimu
Copy link

Onesimu commented Sep 30, 2019

看到生成的页面代码中使用zoom属性进行页面整体缩放, 这种方式在移动端的兼容性如何, 能否适应苹果的retina屏幕?
如果使用meta name="viewport的initial-scale值可以吗, 计算方式是一样的, 不知道哪种兼容性好一些.

@xingqiao
Copy link
Owner

xingqiao commented Oct 3, 2019

目前zoom这套方案已经在线上运行了挺长时间,可以适应苹果的retina屏幕。viewport方案目前兼容性也还可以,两者那种好一些我倒是没有对比过,目前template.html中只是用zoom缩放背景图,改用viewport的话可以对整个页面进行缩放,代码逻辑上倒是简单一些,稍后我来试下

@Onesimu
Copy link
Author

Onesimu commented Nov 6, 2019

请教一个问题, 如果页面的内容和css都是通过数据动态生成并插入到页面上的, 缩放不能适应屏幕, 用zoom和meta都会有问题, 不知道您那边遇见过这种情况吗 有没有什么方式解决?

@xingqiao
Copy link
Owner

xingqiao commented Nov 6, 2019

这种情况可以使用rem或者vw来做自适应缩放

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants