$ .css()在android 2.3中不起作用,但在android 4.0 +浏览器中工作

时间:2013-04-04 10:44:23

标签: android jquery css cordova

您好我正在使用Phonegap框架开发Android应用程序。我正在使用css中的“内容”设置图像。下面是我的代码。

HTML:

<img id="templateImg" class="templateImg" />

CSS:

.templateImg {
    width: 100%;
    height: 92%;
    content:url('../images/CLASSY_Car_Main.png');
}

JS:

imgSrc = $("#templateImg").css('content');

它正在返回

Android 4.0 +中的

imgSrc = url('../images/CLASSY_Car_Main.png')但返回

Android 2.3中的

imgSrc=' '

如何在运行时为android 2.3获取css内容?

0 个答案:

没有答案