wp文章中无法插入htm和css等代码困惑了很久,这几天有时间就研究下,终于找到一款还不错的插件preserve-code-formatting,感觉还不错。另外dirtycode这款wordpress代码高亮的插件也挺不错的,可以可以改背景颜色等,没测试也推荐一下。下面就简单的测试一段代码看看

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<style type="text/css">
<!--
#p_btn{text-align:center;}
#p_btn a {background:none;float:none;}
#p_btn i{background:none;margin:55px 13px 0 12px;}
#p_btn img{display:none;}
#recommend_add,#k_favorite,#k_share,#ak_rate,#recommend_subtract,#k_qqshare,#k_weiboshare,#k_pengyoushare {display:inline-block;float:none;}
#p_btn #k_share{background:url("$_G['style']['styleimgdir']/archy_share.gif") no-repeat 0 0;}
#p_btn #k_favorite{background:url("$_G['style']['styleimgdir']/archy_fav.gif") no-repeat 0 0;}
#p_btn #recommend_add{background:url("$_G['style']['styleimgdir']/archy_add.gif") no-repeat 0 0;}
#p_btn #recommend_subtract{background:url("$_G['style']['styleimgdir']/archy_sub.gif") no-repeat 0 0;}
#p_btn #ak_rate{background:url("$_G['style']['styleimgdir']/archy_rate.gif") no-repeat 0 0;}
#p_btn #k_qqshare{background:url("$_G['style']['styleimgdir']/archy_qqshare.png") no-repeat 0 0;}
#p_btn #k_weiboshare{background:url("$_G['style']['styleimgdir']/archy_weiboshare.png") no-repeat 0 0;}
#p_btn #k_pengyoushare{background:url("$_G['style']['styleimgdir']/archy_pengyoushare.png") no-repeat 0 0;}
-->
</style>