Go to comments ↓ Home » Blog

简单为博客增加圣诞气氛

礼物明天就是圣诞节了,刚好有事要出门,再此先向朋友们说声:圣诞快乐! 😳

我们这边是农村,自从毕业后就没什么圣诞活动了。so,下午花了点时间折腾下wp,为博客添加了点圣诞气氛。

一番修改之后,自我感觉良好。维持个一周左右就还原。明年还可以拿出来用,嘿嘿。

方法都很简单,大部分在朋友们的博客收集来的,特此推荐。

给你的朋友们戴上圣诞帽

亲爱的朋友们,没什么礼物可以送给你们,那么请让我为你们戴上圣诞帽。

正确来说是给评论者头像戴上圣诞帽,示例:

圣诞帽

技术粗糙,样式有点囧,别见怪哈

实现方式很简单,我采用的是修改头像显示的Css,增加背景图片的方法。

先找一个靠谱的圣诞帽图片素材,处理很理想的大小和角度,放到主题目录中。
以inove为例,编辑style.css,将.comment .pic 和.comment .avatar修改为以下样式:

.comment .pic {
 background:url(img/hat.gif) no-repeat center;
 padding-top:48px;
 padding-right:14px;
 margin-top:10px;
}
.comment .avatar {
 width:32px;
 height:32px;
}

其中的img/hat.gif就是帽子图片的路径。
需要圣诞帽素材的朋友,可以看水水的这篇:《圣诞帽透明png素材下载》。

嵌套的头像需要另外修改,由于我这里的效果不太好,就不弄了。

为你的博客添加下雪效果

只需要将这段js加到你的主题中,就可以让你的博客雪花飞舞。

<script src="http://s1.wordpress.com/wp-content/plugins/snow/snowstorm.js" type="text/javascript"></script>

本方法来自awflasher,原作者是Scott Schiller

当然,还有插件的方法实现。
小T同学介绍的let it snow,作者同样是Scott Schiller。跟上面那段代码差不多,可以设置雪花数量,速度,是否停靠浏览器,是否跟随鼠标移动。

注意:下雪效果会增加浏览者cpu占用,特别是ie浏览器。

圣诞雪人:wp-christmas

柳城同学的作品wp-christmas,可以在博客上显示圣诞雪人Flash,可选飘雪效果,这个雪花比起上面的要大些。

同样有代码实现方式:

<div id="MagicFace" Style="POSITION:absolute;Z-INDEX:99;visibility:hidden;"><script language="JavaScript" src="http://liucheng.name/wp-content/plugins/wp-christmas/wp-christmas.js"></script></div>

wordpress博客,推荐放在footer.php的/body之前。

其他资源

SoleilNeon同学推荐的《圣诞主题的WordPress主题与矢量图形》也不错,我的banner就是从那个主题里面挖来的。

有兴趣也可以看看 :

Serho同学的《圣诞献礼——圣诞节小玩意》。

Hobo同学的《66张圣诞壁纸在节日里装点你的桌面》,选择很多呢。

再一次:圣诞快乐^ ^

» 转载请以超链接形式注明来源:A.shun Blog » 《简单为博客增加圣诞气氛》
» 本文链接地址:http://shun.im/21323

» 本文采用 BY-NC-SA 协议进行授权。
» 建议通过 Rss( Feedly | Feedburner | Feedsky )方式及时获取更新。
  1. 雪花挺漂亮

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #1
    @
  2. 若若的问个问题 我也用的这个主题 请问怎么在评论处加上表情啊?

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #2
    @
    • @dev, 添加表情的方法挺多的,有插件我也有代码的。
      插件建议有Highslide4WP、Custom Smilies、Custom Smilies se、WP Grins
      代码可以查看http://zww.me/archives/24672

      Opera 10.10 Opera 10.10 Windows XP Windows XP
  3. 这儿人气真足~

    圣诞快乐

    Firefox 3.5.6 Firefox 3.5.6 Windows 7 Windows 7
    #3
    @
  4. 戴帽子

    Firefox 3.5.5 Firefox 3.5.5 Windows 7 Windows 7
    #4
    @
  5. 哇,博客太漂亮了,可惜我是asp语言,不会弄呀。。郁闷…………

    Maxthon 3.0 Maxthon 3.0 Windows XP Windows XP
    #5
    @
  6. 哈哈 给每个人都带上帽子了

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #6
    @
  7. 看看我還有帽子沒 😀

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #7
    @
  8. 来晚了点,我也来戴圣诞帽

    Firefox 3.5.6 Firefox 3.5.6 Windows 7 Windows 7
    #8
    @
  9. 呵呵 非常棒 雪花已经用上了

    Google Chrome 3.0.195.38 Google Chrome 3.0.195.38 Windows 7 Windows 7
    #9
    @
  10. 这个不错,我也带带

    Shiretoko 3.5.7pre Shiretoko 3.5.7pre Windows 7 Windows 7
    #10
    @
  11. 雪花好玩,跟着鼠标走 😀

    Maxthon 2.0 Maxthon 2.0 Windows XP Windows XP
    #11
    @
  12. 好有心思耶~~ 😮 来戴顶圣诞帽 😎

    Google Chrome 4.0.266.0 Google Chrome 4.0.266.0 Windows XP Windows XP
    #12
    @
  13. 礼盒挺漂亮的

    Maxthon 2.0 Maxthon 2.0 Windows Vista Windows Vista
    #13
    @
  14. 我記得我是有過來祝賀的吧~~

    A.shun同學,你最近怎樣了呢?

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #14
    @
    • @Yibie, 有的,你貌似输错email了,头像显示不正确。
      过得还想吧,哈

      Opera 10.10 Opera 10.10 Windows XP Windows XP
  15. hoho

    Opera 10.55 Opera 10.55 Windows 7 Windows 7
    #15
    @
  16. 也戴个圣诞帽看看 ➡

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #16
    @
  17. 我代表TMD人人网到这里来告你偷盗人人网的创意~恩

    Firefox 3.6b5 Firefox 3.6b5 Windows XP Windows XP
    #17
    @
  18. 接下去就是春节了!

    Firefox 3.5.6 Firefox 3.5.6 Windows 7 Windows 7
    #18
    @
  19. 这个很好!收藏下~

    Internet Explorer 8.0 Internet Explorer 8.0 Windows XP Windows XP
    #19
    @
  20. 气氛确实不错

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #20
    @
  21. 我来看看我的帽子好看不?

    TheWorld Browser TheWorld Browser Windows XP Windows XP
    #21
    @
  22. 迟来的祝福,祝你好运

    360Safe Explorer 360Safe Explorer Windows XP Windows XP
    #22
    @
  23. 日记男孩

    哈哈,很有意思,留言头像上还有圣诞帽

    Maxthon 2.0 Maxthon 2.0 Windows XP Windows XP
    #23
    @
  24. 我也来了,虽然有点晚。

    Firefox 3.5.6 Firefox 3.5.6 Windows 7 Windows 7
    #24
    @
  25. 短歌行

    很有意思,只是没有时间折腾WP了。

    Firefox 3.5.6 Firefox 3.5.6 Windows XP Windows XP
    #25
    @
  26. 呵呵,最上面的 banner 倒是挺温馨滴 😛

    Firefox 3.0.16 Firefox 3.0.16 Windows XP Windows XP
    #26
    @
  27. 世纪之光

    挺幽默的啊,哈哈,头像上都带了红帽子,还好不是绿的,否则你要被群殴了。

    Internet Explorer 8.0 Internet Explorer 8.0 Windows 7 Windows 7
    #27
    @
  28. 哈哈好喜庆 我也来带个圣诞帽

    360Safe Explorer 360Safe Explorer Windows XP Windows XP
    #28
    @
  29. 有意思的效果 ~( ̄▽ ̄)~*

    Safari 4.0.4 Safari 4.0.4 Mac OS X 10.6.2 Mac OS X 10.6.2
    #29
    @
  30. 效果不大好,戴帽应该是tw上流行的吧?

    Firefox 3.5.6 Firefox 3.5.6 Windows 7 Windows 7
    #30
    @
Leave a Reply to 粥小卜

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

点击这里取消回复。