带条纹的PRE CSS代码

分享一段CSS代码:
<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="PHPEclipse 1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
<style>
pre {
  display:block;
  font:normal 12px/22px Monaco,Monospace !important;
  color:#CFDBEC;
  background-color:#2f2f2f;
  background-image:-webkit-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:-moz-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:-ms-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:-o-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  padding:0em 1em;
  overflow:auto;
}
</style>
</head>
<body >
<pre>
PHP代码吧,分享PHP开源程序!
PHP代码吧,分享PHP开源程序!
PHP代码吧,分享PHP开源程序!
PHPCODE8.COM
</pre>
</body>
</html>


将以上代码保存为test.html即可预览效果。

posted on 2012-04-20 15:21  IT技术畅销书  阅读(191)  评论(0编辑  收藏  举报

导航