Home > Web Front-end > HTML Tutorial > What is the order in which css and js are loaded? _html/css_WEB-ITnose

What is the order in which css and js are loaded? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:22:13
Original
1052 people have browsed it

CSS JavaScript

Please tell me. First is in the same page. css at the top. js comes second. What is the loading order?

mrc is the id of a certain div. The css height of this div is set to 50px.
Why is document.getElementById("mrc").style.pixelHeigh initially 0?
document.getElementById("mrc").style.heigh is actually an empty thing?

Is it a loading order problem?

Reply to discussion (solution)

js must be run at least after the div is loaded

css first in js

css first, then js



js must be run at least after the div is loaded

js loading is synchronous, CSS loading is asynchronous.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template