2007年6月5日星期二

在blogger文章中显示源代码

http://ororz.blogspot.com/2007/05/blogger.html
在html模式下,将所有的<替换成&lt;所有>替换成&gt;(注意&是半角符号),然后再发表,用这种方法不仅可以在 Blogger里正常输出文件,而且COPY后不用再去替换全角,很是方便。如果要像本BLOG那样显示代码,可以在CSS样式表中加入下面代码。模版 html(head之前)
CODE {
display: block; /* fixes a strange ie margin bug */
font-family: Courier New;
font-size: 8pt;
overflow:auto;
background: #f0f0f0 url(http://kofreestyler.googlepages.com/Code_BG.gif) left top repeat-y;
border: 1px solid #ccc;
padding: 0px 10px 10px 21px;
max-height:200px;
line-height: 1.2em;
}
code:hover {
background-color:#73A0FF;
}

在编写帖子时,在代码两边加上code
注意:代码部分必须用“lt;”代替“<”,用 “gt;”代替“>”,否则帖子在发布之后还是无法显示出HTML代码的,切记。如果“<”和“>”的数量不多,手动输入即可;如果是一大段的代码,建议使用Dreamweaver或其他的网页编辑工具进行转换。如果你使用了Windows Live Writer之类的Blog离线编辑工具,这个编辑的工作就轻松多了。

18 条评论:

匿名 说...

不错,发现这种方法确实很实用

匿名 说...

good idea... Thanks...

Unknown 说...

多谢,看起来也挺好看的

匿名 说...

代码两边加code不起作用啊。

匿名 说...

now i`ll read your rss

匿名 说...

Excellent way of explaining, and good post to take
information about my presentation focus, which i am going
to convey in institution of higher education.
Feel free to visit my web blog ; casinos offering free spins

匿名 说...

My relatives every time say that I am wasting my time here
at web, except I know I am getting familiarity daily by reading thes good posts.
Here is my web site ... casino gratis para jugar

匿名 说...

Wonderful blog! I found it while surfing around
on Yahoo News. Do you have any tips on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there! Appreciate it
Feel free to surf my web site : online casinos microgaming

匿名 说...

Every weekend i used to go to see this web site, for the reason that i wish for enjoyment, since this this
web page conations truly nice funny material
too.
Feel free to visit my web page :: casino free spins no deposit required

匿名 说...

What's up to every body, it's my first pay a visit of this weblog;
this weblog includes awesome and really good stuff in support of readers.
Check out my blog ... slotomania free spins

匿名 说...

Hi all, here every person is sharing these kinds of knowledge, thus it's nice to read this webpage, and I used to pay a quick visit this weblog every day.
Also visit my homepage ; netentcasinolist.blogspot.com

匿名 说...

Admiring the hard work you put into your blog and detailed information you offer.

It's great to come across a blog every once in a while that isn't the same outdated rehashed material.
Fantastic read! I've saved your site and I'm including
your RSS feeds to my Google account.
Stop by my homepage ... playtech african palace casino software

匿名 说...

Fine way of explaining, and pleasant article to
get data regarding my presentation subject matter, which i am going to deliver in academy.
My webpage : maquinas de casino gratis

匿名 说...

Hello there! I could have sworn I've visited this site before but after going through many of the posts I realized it's
new to me. Anyhow, I'm definitely happy I came across it and I'll be
bookmarking it and checking back frequently!
My weblog ... blogspot.com

匿名 说...

I think this is among the most important info for me.
And i'm glad reading your article. But should remark on few general things, The website style is wonderful, the articles is really nice : D. Good job, cheers
My webpage http://onlinecasinobonuscenter.blogspot.com/

匿名 说...

This web site certainly has all the info I needed
concerning this subject and didn't know who to ask.
Here is my page ... giochi gratis casino

匿名 说...

This paragraph is genuinely a pleasant one it assists new the
web viewers, who are wishing in favor of blogging.
Feel free to visit my website ; No deposit Casino blog

匿名 说...

Everyone loves what you guys are usually up too.
This sort of clever work and reporting! Keep up the superb
works guys I've included you guys to my own blogroll.
My blog netent casino no deposit bonuses