首页 > 解决方案 > 图像未损坏但未显示

问题描述

我有这个 HTML:

<html>

  <head>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://www.gstatic.com/firebasejs/5.3.1/firebase.js"></script>
    <script type="text/javascript" src="callback.js"></script>

  </head>

  <!-- Calls printResponse() when this page loads -->
  <body style="background-color: #ddeaff; text-align: center; margin-top: 100px">
    <img src="assets/bazlogofinal.png" height="720" width="720" style="display: block; margin-left: auto; margin-right: auto;">
    <div style="width: 100%; text-align: center; font-family: 'Helvetica'; font-size: 96px; color: #357aff; font-weight: 900">PLEASE WAIT...</div>
    <div id="url" style="display: none">
          <!-- empty URL for displaying response -->
    </div>
  </body>

</html>

srcforimg是正确的,并且图像没有损坏:

在此处输入图像描述

我试过清除手机上的浏览器历史记录。

标签: htmlimagetagssrcbrokenimage

解决方案


当图像/文件很大时(因为它需要在图像中加载),就会发生这种情况。尝试缩小图像/文件大小。

您可以使用 Photoshop 的 Save for Web 选项或其他无损/有损压缩算法来缩小图像。


推荐阅读