【问题标题】:Images and styles of website are not displayed in phone browser手机浏览器不显示网站图片和样式
【发布时间】:2015-07-24 18:04:20
【问题描述】:

我刚刚将我的 wordpress 网站移到了测试主机上,以检查该网站在实际手机浏览器中的实际显示方式,结果发现既没有显示样式也没有显示图像(如图右侧所示)。

桌面浏览器上的网站工作正常,如果在 Nexus 5 上设置,Chrome 开发工具显示正常(如图左侧所示)。

【问题讨论】:

    标签: android html css image


    【解决方案1】:

    实际上有一个插件可以为您解决这个问题。将本地文件移动到实际主机后,运行this plugin,通过搜索本地网站的根目录并将其更改为您网站的实际根目录。

    类似这样的:

    本地:http://localhost/my-wordpress-website/

    直播:http://www.my-website.com/

    【讨论】:

      【解决方案2】:
      <img class="logo center-block" src="http://localhost/work/zarakunst/zaratheartist/wp-content/themes/starkers-master/img/zarakunst.png" alt="ZaraKunst logo">
      

      您需要在 wp-admin/options-general.php 中替换 http://localhost

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2015-04-13
        • 2021-07-04
        • 2014-05-03
        • 1970-01-01
        • 2011-09-18
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多