Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Split your css into two files.
1) In one, you store common styles (font, background, styles of the main blocks) and load it before the body, so that when the page loads, the user already sees something and understands where he went.
2) In the second, you leave additional styles for modal windows, icons, comments, and other things. You include this file before closing the body, thereby speeding up page loading.
When you are developing, it makes more sense for you to break down the styles according to a methodology that is convenient for you, so that there are no huge footcloths of styles. Then a task manager, such as gulp, automatically compresses and merges everything into 1 file during the build of the project in production. As for the footer, I personally don't really like this idea. Styles are not, in my opinion, what should be loaded from the footer. But this is up to you. But certainly 10 different css files in production is bad form.
You take and create yes css file one header.css, and another main.css
all the content that fits into the first screen is styled in the header.css file, and the rest in main.css . Then, when the whole site is ready, you take and insert the minified header.css into the head in the style tag. That's all profit! True, in HTML 5.2, you can include styles at the end before body, so you decide for yourself. The advantage of the first option is that you hack google page speed and it shows good results. Can be automated with Gulp
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question