为什么我的旧平板电脑不支持混合应用程序中的一些CSS行? [英] Why my old tablet doesn't support some css lines in hybrid app?

查看:173
本文介绍了为什么我的旧平板电脑不支持混合应用程序中的一些CSS行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试做一个混合应用程序(使用PhoneGap),但我的主要问题是,到目前为止,我看起来不同的每个平台。我的PC上的浏览器和Android 5.0+看起来像我想,但在旧版本的Android上出现一些问题。我已经测试了2个不同的平板电脑。两者与Android 4.2.2。(三星和联想)。它们都不识别字体单元vw(vh既不)。其中一人不认可border-radius或至少不规则:照片。而第二个动画有一些麻烦,例如。像这样:

I try to make a hybrid app (using PhoneGap) but my main problem is that so far i looks different on every platform. I the browser on PC and on the Android 5.0+ looks as I want to but on older versions of android appear some problems. I've tested it on a 2 different tablets. Both with Android 4.2.2.(Samsung and Lenovo). Both of them don't recognize font unit vw (vh neither). One on them doesn't recognize commend "border-radius" or at least irregularly: photo. Whereas the second one has some troubles with animations e.g. like this one:

.totheleft{
animation-name: nalewotrzy;
animation-duration: 1.5s;
}

@keyframes totheleft{
to {transform: translate(-100%, 0%);}
}

现在我不知道旧版本的Android是不是支持CSS3或者我的css文件不正确地实现到html代码:

And now I don't know if maybe the old versions of Android don't support CSS3 or I implemented my css file incorrectly into html code:

<head>
<link rel="stylesheet" href="index.css"/>
</head>

我在编程方面很新。

推荐答案

直到Android 5.0 Lollipop,每个设备中的WebView是操作系统镜像的一部分。很遗憾,这意味着除非系统更新了HTML5功能/错误在时间上冻结。

Until Android 5.0 Lollipop the WebView in each device is part of the Operating System image. Unfortunately this means that unless the OS is updated that HTML5 features/bugs are frozen in time.

在Android 5.0中,WebView现在基于一个Google Play更新组件System WebView。

With Android 5.0 the WebView is now based on a Google Play updated component called Android System WebView.

请参阅: https: //developer.chrome.com/multidevice/webview/overview

或者,您也可以使用CrossWalk计划: https://crosswalk-project.org/ 作为您的WebView,以获得更加一致的Android版本(4.1及更高版本)的体验,但代价是你的应用程序更大,由于添加在自己的WebView。

Alternatively you could use the CrossWalk Project: https://crosswalk-project.org/ as your WebView for a more consistent experience on old Android versions (4.1 and higher) but at the cost of making your app bigger due to adding in its own WebView.

请参阅: https://crosswalk-project.org/documentation/about/faq.html#Distributing-Crosswalk-Project-applications 71mb已添加到应用程序大小的人行横道

这篇关于为什么我的旧平板电脑不支持混合应用程序中的一些CSS行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆