0

I have a parent element with display property set to none. So the children of the parent will not be visible.

How the browsers manipulate the rest of the children properties?

(a) They stop working since the parent element is display:none(so the execution time is short)

or

(b) They will continue with the rest css properties of the children in the "background" even though they will not be displayed(so the execution time is longer than the (a) condition)?

Thanks for any answer.

Bill
  • 130
  • 1
  • 8
  • “Execution time” of what exactly …? – CBroe Mar 20 '15 at 13:58
  • 1
    If I understand correctly, the browser still renders the content, it just doesn't show it. For example if you had a 1MB image in one of the children, it would still load that image (which would take both time and bandwidth). – Patrick Mar 20 '15 at 14:01
  • Execution time to display the parent element. It might be a negligible amount of time, but I am wondering what the browsers do with that – Bill Mar 20 '15 at 14:05
  • @Patrick That's exactly what I mean. So is there any way to prevent that? – Bill Mar 20 '15 at 14:06
  • @BillysGtr It really depends on why/how you're hiding it. You can selectively load content with media queries if you're trying to limit things for mobile devices. Please give more detail as to what you're trying to accomplish. – Patrick Mar 20 '15 at 14:08
  • http://stackoverflow.com/questions/12158540/does-displaynone-prevent-an-image-from-loading/ – CBroe Mar 20 '15 at 14:10

0 Answers0