Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css: display none. Is it expensive?

Tags:

html

css

I decide to make read more... function by having two divs, and setting one of them display: none but in this case i store all the data twice. now the question -


If I have one div element, with style="display:none", which contains many big size images in it, is it have an influence on page opening time?

like image 566
Simon Avatar asked Dec 06 '22 03:12

Simon


1 Answers

display:none does not prevent the hidden content from being loaded with the rest of the page.

If you want to make the page "lighter" at load time you can load the "read more.." content via Ajax on-demand.

like image 127
Diodeus - James MacFarlane Avatar answered Dec 30 '22 08:12

Diodeus - James MacFarlane