网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网页制作 > CSS
网页制作:Dreamweaver教程,FrontPages教程,Javascript教程,HTML教程,CSS教程,心得技巧,DHTML教程,网页特效,Discuz!论坛
本月文章推荐
.FF下神秘的不起作用的CSS.
.网页布局中CSS的Class灵活应用.
.CSS中expression使用简介.
.CSS样式表设计的十条技巧.
.如何让某个页面使用特定的CSS.
.CSS的长度单位(em)与em标签.
.CSS+DIV表格背景透明,内容不透明.
.自定义CSS cursor.
.CSS+DIV标签命名规范.
.提升兼容不同浏览器CSS Hack的写.
.使用CSS定位页面的“footer”.
.CSS网页中的相对定位与绝对定位.
.CSS中有序列表的一些特殊代码形式.
.CSS opacity-实现图片半透明效果.
.CSS 循序渐进(一)画个瓢 .
.CSS隔行换色.
.css技巧:批量保存div+css图片方.
.初学入门简单了解学习CSS的伪类.
.提高CSS的网页渲染效率.
.初学CSS和标准建站的一些CSS常用.

css代码格式化清理工具

发表日期:2008-9-23


<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>


<title> CSS 代码格式化工具 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
    a {color:blue; font-size:12px}
    textarea {width:100%; height:300px; display:block; margin:10px 0; font-size:12px}
    input {font-size:12px}
</style>
<script type="text/javascript">
<!--
    function formatCSS(n){
        var c = document.getElementById("abc");
        var d = document.getElementById("def");
        var v = c.value;
        if (n==1){
            d.value = v.replace(/\r\n/g,"").replace(/}/g,"}\r\n").replace(/\*\//g,"*/\r\n");
        }
        if (n==2){
            d.value = v.replace(/\r\n/g,"").replace(/}/g,"}\r\n").replace(/\s*;\s*/g,";").replace(/;/g,";\r\n\t").replace(/{/g,"{\r\n\t").replace(/}/g,"\r\n}").replace(/\*\//g,"*/\r\n");
        }
        if (n==3){
            c.value = d.value = "";
        }
    }
//-->
</script>
<style type="text/css" charset="utf-8">/* See license.txt for terms of usage */

.firebugHighlight {
    z-index: 2147483647;
    position: absolute;
    background-color: #3875d7;
}

.firebugLayoutBoxParent {
    z-index: 2147483647;
    position: absolute;
    background-color: transparent;
    border-right: 1px dashed #BBBBBB;
    border-bottom: 1px dashed #BBBBBB;
}

.firebugRulerH {
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 14px;
    background: url(chrome://firebug/skin/rulerH.png) repeat-x;
    border-top: 1px solid #BBBBBB;
    border-right: 1px dashed #BBBBBB;
    border-bottom: 1px solid #000000;
}

.firebugRulerV {
    position: absolute;
    top: 0;
    left: -15px;
    width: 14px;
    height: 100%;
    background: url(chrome://firebug/skin/rulerV.png) repeat-y;
    border-left: 1px solid #BBBBBB;
    border-right: 1px solid #000000;
    border-bottom: 1px dashed #BBBBBB;
}

.overflowRulerX > .firebugRulerV {
    left: 0;
}

.overflowRulerY > .firebugRulerH {
    top: 0;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

.firebugLayoutBoxOffset {
    z-index: 2147483647;
    position: absolute;
    opacity: 0.8;
}

.firebugLayoutBoxMargin {
    background-color: #EDFF64;
}

.firebugLayoutBoxBorder {
    background-color: #666666;
}

.firebugLayoutBoxPadding {
    background-color: SlateBlue;
}

.firebugLayoutBoxContent {
    background-color: SkyBlue;
}

/*.firebugHighlightGroup .firebugLayoutBox {
    background-color: transparent;
}

.firebugHighlightBox {
    background-color: Blue !important;
}*/

.firebugLayoutLine {
    z-index: 2147483647;
    background-color: #000000;
    opacity: 0.4;
}

.firebugLayoutLineLeft,
.firebugLayoutLineRight {
    position: fixed;
    width: 1px;
    height: 100%;
}

.firebugLayoutLineTop,
.firebugLayoutLineBottom {
    position: absolute;
    width: 100%;
    height: 1px;
}

.firebugLayoutLineTop {
    margin-top: -1px;
    border-top: 1px solid #999999;
}

.firebugLayoutLineRight {
    border-right: 1px solid #999999;
}

.firebugLayoutLineBottom {
    border-bottom: 1px solid #999999;
}

.firebugLayoutLineLeft {
    margin-left: -1px;
    border-left: 1px solid #999999;
}
</style></head><body onload="document.getElementById('abc').focus()">
<h1>CSS 代码格式化工具</h1>
<textarea id="abc" cols="150" rows="20" wrap="off" title="在这里输入CSS代码"></textarea>

<input value=" 横排 " onclick="formatCSS(1)" type="button">
<input value=" 竖排 " onclick="formatCSS(2)" type="button">
<input value=" 清空 " onclick="formatCSS(3)" type="button">

<textarea id="def" cols="150" rows="20" wrap="off" title="这里将输出CSS代码"></textarea>

<a href="http://www.devdao.com" target="_blank">http://www.devdao.com</a>
</body></html>

上一篇:给css初学者的提示 人气:801
下一篇:css文字重复ie bug导致文字的奇怪复制 人气:598
浏览全部css的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐