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

js动态修改整个页面样式达到换肤效果_javascript技巧

WBOY
Release: 2016-05-16 16:47:03
Original
1041 people have browsed it

jsPro1\js动态修改整个html页面样式(换肤).html

复制代码 代码如下:





动态修改页面样式






修改整个页面的样式












jsPro1\css\red.css
复制代码 代码如下:

* {
margin: 0px;padding: 0px;
}


body {
background-color: #eeeeee;
}
span {
color: red;
}
#txt {
color: #f00;border: 1px solid #7d1515;
}
.btn {
background-color: #a52a2a;border: none;color: white;width: 100px;height: 28px;
}

jsPro1\css\blue.css
复制代码 代码如下:

* {
margin: 0px;padding: 0px;
}


body {
background-color: #eeeeee;
}
span {
color: blue;
}
#txt {
color: #0000cd;border: 1px solid #006400;
}
.btn {
background-color: #0000cd;border: none;color: white;width: 100px;height: 28px;
}
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!