Website Skin Change

Source: Internet
Author: User
Website skin, before the feeling is always very magical ah, today to summarize. I'm writing about two ways of thinking.

First of all need to build a CSS folder, which contains a different color of the CSS file: blue.css; red.css; yellow.css; green.css in these files, respectively, write the styles to be changed.

Next is the HTML file, first of all: write only one link tag (not recommended, reason please continue to read). The code is as follows:

 
   
 
  Dynamic Skin Change
 
  
 
  
 
  
 
  
 
  

The first idea is to write only one link, and then add the style sheet to head, but it will cause more and more page style sheets, so it is not recommended.

The second idea: Write 4 link tags, and then adjust the link's availability or not to achieve website skin. The code is as follows:

 
  Dynamic Skin Change
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  

Note the HTML section of the two methods of the custom attribute Data-color, one is the color, and the other is the number.

  • 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.