HTML:浏览器如何渲染图像以进行布局?
网络浏览器在最初渲染时分配多少布局空间:
网络浏览器在最初渲染时分配多少布局空间:
当<时,网络浏览器分配多少布局空间em>最初渲染:
当<时,网络浏览器分配多少布局空间em>最初渲染:
更新:
我想要确定的是浏览器是否首先分配 0x0,然后在获得尺寸后放大布局,或者...在使用最小/最大高度/宽度的情况下 - 浏览器是否实际分配那么多空间,然后在获得实际尺寸后更新布局。
How much layout space does a web-browser allocate when initially rendering:
<img src="image.jpg" />
How much layout space does a web-browser allocate when initially rendering:
<img src="image.jpg" style="max-height:100px; max-width:200px" />
How much layout space does a web-browser allocate when initially rendering:
<img src="image.jpg" style="min-height:50px; min-width:110px" />
How much layout space does a web-browser allocate when initially rendering:
<img src="image.jpg" height="97" width="134" />
Update:
What I'm trying to determine is if the browser first allocates 0x0 and then scales up the layout once the dimension is obtained OR ... in the cases of using min/max-height/width - does the browser actually allocate that much space and then updates the layout once it has the actual dimensions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定为什么这对您来说很重要,但它是:
在 Internet Explorer 中,大小为 x 图标加上任何替代文本的大小。在其他一些浏览器中,大小只是替代文本的大小。
但您应该知道,浏览器经常会在短时间内多次渲染同一页面,尤其是在读取图像元数据之后。
您可以通过指定不存在的文件来查看它们的初始大小,例如:
I'm not sure why this is important for you to know, but here it is:
In Internet Explorer, the size is that of the x-icon plus any alt text. In some other browsers the size is just that of the alt text.
But you should know that browsers often render the same page multiple times in a short period of time, especially after reading image metadata.
You can see what initial size they are by specifying a file that doesn't exist, such:
不管它想要多少。
您必须在您关心的所有浏览器中执行测试才能获得答案。
However much it wants.
You would have to perform tests in all the browsers you care about to get answers for them.