怎样切换Blogger的CSS主题?
引用”本来在写黑色环保省电节能版的博客的时候就应该把how to实现blogger的css主题切换的步骤写出来,一直偷懒拖到现在。既然Koole又把这个问题提出来,那就写一下具体的做法(这里只介绍怎样做,至于为什么要这么做请参看原作者的文章:Theme Switching With Blogger)
第0步:当然是备份自己的模板,没啥说的!
第1步:既然要在不同的CSS主题间切换,当然要准备至少2个不同的CSS主题。你可以将<b:skin></b:skin>(不包括<b:skin></b:skin>)间的CSS代码作为一个主题(复制到任何一个文本编辑器中,另存为1.css),然后在这个文件基础上做一些简单的修改,比如,更换一下背景颜色等等等,另存为2.css,以次类推。
tips: 第二个css文件中只须列出与前一个文件不同的部分。
第2步:将第1步中制作的2个(或者n个css文件)上传到你的网络空间上。然后在<b:skin></b:skin>前添加以下代码:<link href=‘1.css的url地址' rel='stylesheet' type='text/css'/><link href='2.css的url地址' media='screen' rel='alternate stylesheet' title='light-css' type='text/css'/>
tips: 如上传到google pages上的话,当pages.google.com被封锁的时候,你的blogger网页呈现“裸体”状态(非常不雅观的说)。
第3步:下载styleswitch.js文件,上传到自己的网络空间,然后在第2步的代码后加入以下代码:<script src='你的styleswitch.js文件url地址' type='text/javascript'>/************************************************ Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more***********************************************/</script>
最后,将以下代码放到你认为合适的位置(比如侧边栏):<a href="javascript:chooseStyle('none', 365)">1号主题</a>
<a href="javascript:chooseStyle('light-css', 365)">2号主题</a>
下面o开始回答大家的问题...
[源自:80博客]
1 评论:
The aggregation boasts that it was an Rolex watch that was the aboriginal on the moon with the US Astronaut Buzz Aldrin. It has been associated with the acclaimed James Bond cine authorization back 1995. They are amid in Biel/Bienne Switzerland and it is one of the added celebrated cast names in watches today.