What is the difference between writing the style tag after the body and before the body?
巴扎黑2017-05-19 10:28:04
Written in the head tag to facilitate progressive rendering by the browser (resources downloading->CSSOM+DOM->RenderTree(composite)->Layout->paint). For the specific rendering process, please refer to
http://blog.csdn.net/wozaixia...
Written after the body tag. Since the browser parses the HTML document line by line, when it parses the style sheet written at the end (external (coupled or written in the style tag) will cause the browser to stop the previous rendering and wait for the loading and parsing of the style sheet to be completed before re-rendering. FOUC may occur under IE in Windows (that is, the page flickering problem caused by style failure)
大家讲道理2017-05-19 10:28:04
Written at the end is to load the body first and then the style - what difference can there be? .
世界只因有你2017-05-19 10:28:04
Writing it at the back may cause FOUC, it is better to write it at the front
曾经蜡笔没有小新2017-05-19 10:28:04
Loading order, the front is loaded before the body, the last is loaded after the body is loaded, and then loaded
给我你的怀抱2017-05-19 10:28:04
This is related to the browser crawler. The crawler enters the HTML mode when loading the page. If it is written before the body, the page has not started to be displayed, and the page white screen effect will not appear; if it is written after the body, when crawling to the css code, the crawler enters the css. mode, a white screen may appear.
伊谢尔伦2017-05-19 10:28:04
Generally, styles are placed between the heads. If the style is placed at the bottom. It loads the tags and renders the styles. If it loads slowly, you'll see it dance.