Simple skin change code

Source: Internet
Author: User
The code is as follows: Copy code

Simple skin change code
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Script>
Function changeStyle (name ){
Css = document. getElementById ("cssfile ");
Css. href = name + ". css ";
}
</Script>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> Untitled Document </title>
<Link href = "css1.css" rel = "stylesheet" type = "text/css" id = "cssfile"/>
</Head>
<Body>
<Div id = "header">
<H1> Advantages of css2.0 </Div>
<Div id = "nav">
<Input type = "button" value = "classic blue" onclick = "changeStyle ('css1');"/>
<Input name = "button" type = "button" onclick = "changeStyle ('css2');" value = "ruby red"/>
</Div>
<Div id = "content">
The website skin changer can be a book but originally implemented script that can be used to conduct mutual daily necessities on the webpage without having to do so. We will first discuss the page below. The website skin changer can be a book the originally implemented scripts can be used for mutual daily necessities on the webpage without having to renew them. We will first discuss the neighborhood of the website below in the cold discussion, which is a book but originally implemented script that can be saved on the webpage without having for mutual daily necessities, we will first cool the discussion below the page of the website of the skin replacement work can be a book but the original implementation of the script can be free of the local page of a pair of mutual daily necessities, we first cold the page below the seminar
</Div>
</Body>
</Html>
Save the following code as css1.css
<Style>
Body {margin: 0px; padding: 0px ;}
# Header {padding: 10px; background-color: #0d3460; color: # fff; font-family: Arial ;}
H1 {font-size: 20px; width: 760px; margin: 0px auto ;}
# Content {width: 760px; margin: 0px auto; font-size: 12px; color: #444; padding: 10px; line-height: 180% ;}
# Nav {text-align: center; margin: 0px auto; padding: 10px 0px; background-color: # eee ;}
Input {font-size: 12px ;}
</Style>
Save the question as css2.css
Body {margin: 0px; padding: 0px ;}
# Header {padding: 10px; background-color: # ce0b0b; color: # fff; font-family: Arial; float: left; height: 500px ;}
H1 {font-size: 20px ;}
# Content {font-size: 12px; color: #444; padding: 20px; line-height: 180% ;}
# Nav {text-align: center; padding: 10px; background-color: # eee; float: left; height: 500px; width: 100px ;}
Input {font-size: 12px; margin-top: 20px ;}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.