是否显示:无仍然使用的渲染性能 [英] Does display:none still use performance of rendering
问题描述
可以说我有标记,例如本
Lets say i have markup such as this
<div style='display:none'>
<!--Flash Object-->
</div>
请问浏览器仍然使用资源加载Flash对象,还是会被推迟,直到一个JavaScript调用,以切换 dislplay:块
;
现在请记住,我不是在谈论加载的对象。我说的是渲染它。为什么我澄清这个的原因是因为,如果我改变闪光灯对象的 IMG
标记它仍然会下载资源。
Now please bear in mind I am not talking about loading the object. I am talking about rendering it. The reason why i clarify this is because if I change the flash object to an img
tag it would still download the resource.
这背后的主要原因是响应的CSS设计
的一切都很好改变你的网站CSS布局,以适应屏幕,但渲染的资源需要时间和林不知道浏览器如何处理已下载的资源只是不渲染。
The main reason behind this is responsive css design
its all well and good changing your website to a css layout to suit the screen but rendering resources takes time and im not sure how browsers handle resources that are downloaded just not rendered.
推荐答案
是的,肯定的是,无论状态显示属性,闪光灯资源(包括定期图像或音乐,或别的东西)将永远呈现。
Yes , sure, whatever status the "display" attribute is, the flash resource(including regular image, or a music, or something else) will be always rendered.
有关我的经验,显示属性与渴望/延迟加载没有生意。如果你想在最后时刻来渲染一个对象,我建议你使用JavaScript或者一些其他的办法。
For my experience, the "display" attribute has no business with "eager/delay loading". If you want to render an object at the last moment, I suggest you use javascript or some other approach.
这篇关于是否显示:无仍然使用的渲染性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!