图像未损坏但未显示
Image not broken but not showing
我有这个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>
img
的 src
是正确的,图像没有损坏:
我已经尝试清除 phone 上的浏览器历史记录。
当 image/file 尺寸较大时(因为它需要加载到图像中),可能会发生这种情况。尝试将 image/file 尺寸调小。
您可以使用 Photoshop 的 save for web 选项或其他 lossless/lossy 压缩算法缩小图像。
我有这个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>
img
的 src
是正确的,图像没有损坏:
我已经尝试清除 phone 上的浏览器历史记录。
当 image/file 尺寸较大时(因为它需要加载到图像中),可能会发生这种情况。尝试将 image/file 尺寸调小。
您可以使用 Photoshop 的 save for web 选项或其他 lossless/lossy 压缩算法缩小图像。