CSS图像和<img/>元素会被加载两次吗?

时间:2012-08-05 15:13:53

标签: css image http request

  

可能重复:
  Will browser download image twice if it's used in both an image's src as well as a div's background-image?

我有这个标记:

<style>
  #bg {
    background: url(sprite.php);
  }
</style>
<div id="bg"></div>
<img src="sprite.php" />

浏览器会加载sprite.php两次,还是只会发出一次请求?

0 个答案:

没有答案