`

Simple switch themes

 
阅读更多

Problems:

Two pages have similar elements structure but with different style themes. Or in the same page, we want to apply different style according to the user's preference.

Solution:

One option would be load different css file according to the theme.

But here, we would introduce a simple theme swith method. We change the container class to swith the theme. The different style of each theme are refected in the element selector with the container class.

 

Try it with jsfiddle

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics