1. 首页
  2. css

CSS描述和尺寸:引擎盖下

埃里克·波蒂斯(ericportis)深入研究了浏览器如何决定要下载的图像,当你赋予它<img>. Notably, a browser can do whatever it wants:

Intentionally un-specified behavior lets browsers provide innovative answers to an open-ended question.

Still, calculations happen based on what you give it and you can still do a good job with that part.

The very weirdest part about all this is that the sizes属性时,它会改变图像的\"自然宽度\",这会导致意想不到的放大,这是我们被训练成厌恶的事情。如果你在这种情况下,你可以…

  • 使用一个inlinewidth属性
  • 设置一个inlinestyle和一个max-width
  • 接受这样一个事实:你可能会经历偶尔的升级

直接链接→

CSS描述和尺寸:引擎盖下 为WP2原创文章,链接:https://www.wp2.cn/css/css%e6%8f%8f%e8%bf%b0%e5%92%8c%e5%b0%ba%e5%af%b8%ef%bc%9a%e5%bc%95%e6%93%8e%e7%9b%96%e4%b8%8b/

发表评论

您的电子邮箱地址不会被公开。