【问题标题】:Cordova Background Image Doesn't Work On Android [closed]Cordova 背景图像在 Android 上不起作用 [关闭]
【发布时间】:2019-12-07 09:24:15
【问题描述】:

我的背景图像在我使用cordova 构建的Android 应用程序中无法正常工作。当我在浏览器上运行它时,背景图像工作得很好,但在应用程序上它只是一个空白的白色背景。在下面,我包含了我的 CSS 代码。 structurethe coderesult on browserresult on apps

【问题讨论】:

  • 你试过img/bag.jpg 吗?
  • 我已经尝试将我的
  • 事情是在不知道您的文件夹结构的情况下很难假设问题。检查设备时是否在控制台中出现错误?
  • 我已经编辑了问题并添加了结构图像。我没有使用模拟器来测试安卓设备。

标签: android html css cordova


【解决方案1】:

结构如下

www
   -> css
        - style.css

   -> img
        - bag.jpg

   -> index.html

来自 style.css

background:url(../img/bag.jpg);

来自 index.html

background:url(img/bag.jpg);

【讨论】:

    猜你喜欢
    • 2016-04-27
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-08
    相关资源
    最近更新 更多