javascript - Why does the same sentence of code have different results in the console and in the js file?
天蓬老师2017-06-12 09:29:30
0
1
642
With the same code, why are the output results different? I used rem's adaptive layout. I wonder if this has something to do with it? How can it be solved?
This is the css code, 1rem is this number: fontsize=screenWidth/320*100;
The execution time of this line of code in the js file is after the document is loaded And the time when you execute the code in the console is after the js processing is completed. During this period, the content has been filled in this element, right?
The execution time of this line of code in the js file is after the document is loaded
And the time when you execute the code in the console is after the js processing is completed. During this period, the content has been filled in this element, right?