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.