html - 图像未损坏但未显示
问题描述
我有这个 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>
的src
forimg
是正确的,并且图像没有损坏:
我试过清除手机上的浏览器历史记录。
解决方案
当图像/文件很大时(因为它需要在图像中加载),就会发生这种情况。尝试缩小图像/文件大小。
您可以使用 Photoshop 的 Save for Web 选项或其他无损/有损压缩算法来缩小图像。
推荐阅读
- mysql - 在 after_create 中调用时是否忽略 update_attribute?
- javascript - ReactJs:TypeError:无法读取未定义的属性“ItemsServices”
- python - 类型错误:Newey West 用于 Python 中的 OLS
- json - JQ:从 JSONL 输入中过滤和选择行?
- javascript - 在下拉元素中按字母顺序对 API 结果进行排序(请仅使用 Javascript)
- python - Heroku:Python Django 部署突然失败
- python-3.x - 在熊猫数据框中创建聚合列
- javascript - 在 React 中渲染新组件 onclick
- python - 如何从数据集中删除 EXIF 数据?
- api - 从 Google 电子表格请求 BigQuery API 会产生错误