自己运行一个网页,发现在日志里显示The key "target-densitydpi" is not supported.
查了下相关资料,发现:target-densitydpi属性现已弃用。具体参考Viewport target-densitydpi support is being deprecated | Pete LePage
原话是这样的“Support for target-densitydpi in the viewport meta tag was recently removed from WebKit and with Chrome for Android moving forward to current revisions on WebKit, this change is now rolling out in Android.”
也就是说,target-densitydpi已经弃用了。
同时,这篇博客也给了人用法,即在WebKit 中,如果需要把target-densitydpi=device-dpi。
我的策略更简单,发现target-densitydpi在网页中没用,就直接在网页中把相关属性删除了。