Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 控制 HTML 中的图像加载顺序
有没有办法在网站上设置加载优先级或图像加载顺序?
您可以使用 jQuery 并尝试某事。像那样:
$(document).ready(function() { var preloaded_image = $('<img />').attr('src', 'img.jpg'); $('#img_div').append(preloaded_image); });
这应该会导致图像在其余内容之后加载。