Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 17:43:01
Original
1307 people have browsed it

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;}
Related labels:
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