Home >Web Front-end >JS Tutorial >JS determines different resolutions and calls different CSS style files to implement ideas and test codes_javascript skills

JS determines different resolutions and calls different CSS style files to implement ideas and test codes_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:43:011347browse

I recently looked at a website and found that different monitor resolutions call style files differently. Today I wrote an example to study it,

Copy code The code is as follows:




Untitled Document







Content in c1.css
Copy code The code is as follows:

*{ margin:0; padding:0;}
div{ width:960px; height:400px; margin :0 auto; background:blue; color:#ffffff;}

Content in c2.css
Copy the code The code is as follows:

*{ margin:0; padding:0;}
div{ width:1200px; height:400px; margin:0 auto; background:red; color:#fff;}
Statement:
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