【问题标题】:Android 2.3 browser - image doesn't appearAndroid 2.3 浏览器 - 不显示图像
【发布时间】:2013-10-21 02:45:49
【问题描述】:

当在 Android 2.3 手机上的 Firefox 中查看此页面时:

http://www.lmidev.com/sites/main/classlocator/index-mobile.html

“地址或邮政编码”框中出现放大镜图像(这是一个“提交”输入按钮,应用了背景图像)。但是在默认的 Android 浏览器上,它不会出现。为什么会这样,或者我怎样才能知道?在具有相同代码的不同域中的另一个页面上,图像在 Android 浏览器中显示正常。

(我尝试让 weinre 进行远程调试,但是当我浏览该站点时无法连接服务器。我现在已经删除了用于连接到 weinre 的 JavaScript)

【问题讨论】:

    标签: android-2.3-gingerbread android-browser


    【解决方案1】:

    提交按钮的背景图片是这样应用的:

    background: url("../images/mobile/sprite.png") no-repeat scroll -61px -3px transparent;
    

    由于某种原因,在 Android 2.3 浏览器中,我需要在样式属性中添加 '!important' 声明:

    background: url("../images/mobile/sprite.png") no-repeat scroll -61px -3px transparent !important;
    

    最好的猜测是 Android 为提交按钮应用了自己的背景,这需要被覆盖。

    【讨论】:

      猜你喜欢
      • 2013-04-15
      • 2016-02-28
      • 2021-11-25
      • 2015-04-16
      • 2013-01-28
      • 1970-01-01
      • 2021-06-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多