Do external stylesheets get loaded before the HTML?

后端 未结 4 1142
夕颜
夕颜 2021-01-07 21:30

If I have external stylesheets being included in the section of my HTML page, will they be loaded before the HTML and immediately appl

4条回答
  •  时光取名叫无心
    2021-01-07 21:58

    Style sheets don't prevent the document from being downloaded, but the browser won't render the document until all of the linked stylesheets have been downloaded and loaded into the DOM.

    This is so that the browser doesn't need to render the page twice (wasting time in the process), and so that an unstyled page won't flash in front of the user before the stylesheets have been downloaded and parsed.

提交回复
热议问题