浏览器如何渲染背景大小的值?

时间:2015-01-14 12:41:28

标签: html css browser rendering

a question I've recently asked的积极回应让我对浏览器如何呈现网页感到好奇。

我发现this article非常有趣,但很多事情都在我头上。

特别是,我对渲染背景大小值背后的逻辑感兴趣。

我对链接问题的首选答案包含对containcover值的有用建议:

内含

if (aspect ratio of container > aspect ratio of image)
    image-height = container height
    image-width = aspect-ratio-preserved width

else
    image-width = container width
    image-height = aspect-ratio-preserved height

封面

if (aspect ratio of container > aspect ratio of image)
    image-width = container width
    image-height = aspect-ratio-preserved height

else
    image-height = container height
    image-width = aspect-ratio-preserved width

另外,假设在渲染过程中检查了类似的东西,它是否会在浏览器中发生变化?

提前感谢任何建议。

0 个答案:

没有答案
相关问题