Giter Site home page Giter Site logo

在安卓app中viewport无效 about hotcss HOT 5 CLOSED

imochen avatar imochen commented on May 11, 2024
在安卓app中viewport无效

from hotcss.

Comments (5)

imochen avatar imochen commented on May 11, 2024
  • 1、确认下hotcss有没有强制dpr=1
<meta name="hotcss" content="initial-dpr=1">
  • 2、尝试在原生浏览器打开,验证是否正常显示。

from hotcss.

KevisLuo avatar KevisLuo commented on May 11, 2024
  1. 并没有设置强制dpr=1
    2.在原生浏览器的和ios设备的都是正常的
    所以我觉得是不是要在app做什么配置,咨询了我们的安卓开发,他们也是不清楚,只能来这里求助了-_-

from hotcss.

imochen avatar imochen commented on May 11, 2024

让安卓开发打开debug开关,然后PC Chrome远程调试一下页面。定位一下问题。
可能出现问题的地方:dprdocument.documentElement.getBoundingClientRect().width

安卓webview开启debug方法如下:
调试WebView需要满足安卓系统版本为Android 4.4+。在WebView类中调用静态方法setWebContentsDebuggingEnabled

if (Build.VERSION.SDK_INT >=Build.VERSION_CODES.KITKAT) {  
    WebView.setWebContentsDebuggingEnabled(true);  
}

from hotcss.

KevisLuo avatar KevisLuo commented on May 11, 2024

之前debug过,dpr和meta设置都是对的,只是scale的效果并没有生效

from hotcss.

imochen avatar imochen commented on May 11, 2024

这个问题配合安卓开发debug下吧。纯前端已然看不出任何问题了。先close掉。任何疑问随时联系。

from hotcss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.