DW中,怎样生成.CSS文件?

我有如下代码:

1<style>   
2<!--   
3a:link { color: #000000;text-decoration: none}   
4a:visited { color: #777777;text-decoration: none}   
5a:hover { color: #570000; text-decoration: underline}   
6\-->   
7</style>

请问怎样做,我才能将这段代码生成.CSS文件,以便以后的网页中可随时调用该文件,而不必每一页都插入这段代码?
---------------------------------------------------------------

网页里写

1<link href="/style.css" rel="stylesheet"/>

CSS里写
style.css
-----------------
BODY
{
SCROLLBAR-FACE-COLOR: #a6a6a6;
FONT-SIZE: 9pt;
SCROLLBAR-HIGHLIGHT-COLOR: #cacaca;
SCROLLBAR-SHADOW-COLOR: #000000;
COLOR: #000000;
SCROLLBAR-3DLIGHT-COLOR: #445555;
SCROLLBAR-ARROW-COLOR: #ffffff;
SCROLLBAR-TRACK-COLOR: #666666;
FONT-FAMILY: "Verdana", "Arial", "宋体";
SCROLLBAR-DARKSHADOW-COLOR: #666666;
color:#000000;font-size : 12px;line-height: 12pt;font-weight : normal;font-family:宋体;OVERFLOW:scroll;OVERFLOW-X:hidden
}
P {font-size : 12px;font-weight : normal;line-height: 12pt;font-family:宋体}
BR {font-size : 12px;font-weight : normal;line-height: 12pt;font-family:宋体}
SELECT {font-size : 12px;font-family:宋体}
INPUT {font-size : 12px;font-family:宋体}
FORM {font-size : 12px;margin-bottom : 0px;margin-top : 0px;font-family:宋体}
TD {color:#000000;font-size : 12px;}
A:link {
COLOR: #000000; TEXT-DECORATION: none;line-height:12pt;font-family:宋体
}
A:visited {
COLOR: #000000; TEXT-DECORATION: none;line-height:12pt;font-family:宋体
}
A:hover {
COLOR: #000000; TEXT-DECORATION: underline;line-height:12pt;font-family:宋体
}
.14px{font-size:14px}
.underline:hover{TEXT-DECORATION: underline}
.red:hover{COLOR: #CC0000;TEXT-DECORATION: underline}
.underline2:link{TEXT-DECORATION: underline}
.underline2:visited{TEXT-DECORATION: underline}
.underline2:hover{COLOR: #CC0000;TEXT-DECORATION: none}
.underline3:link{TEXT-DECORATION: underline}
.underline3:visited{TEXT-DECORATION: underline}
.dropshad0 {filter:DropShadow(OffX=0, OffY=1, color:CCCCCC)}
.dropshad1 {filter:DropShadow(OffX=0, OffY=1, color:666666)}
.dropshad2{filter:DropShadow(OffX=0, OffY=1, color:AAAAAA)}
.dropshad3{filter:DropShadow(OffX=0, OffY=1, color:FFFFFF)}
.dropshad4{filter:DropShadow(OffX=0, OffY=1, color:000000)}
.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
.bg_right { background-repeat: no-repeat; background-position: right top}
.bg_left { background-repeat: no-repeat; background-position: left top}

这就是样例
---------------------------------------------------------------

在DW里text--->css styles--->new css style

定义新的样式表的时候,define一项选择new style sheet file,可以把样式表单独存为一个*.css文件,用的时候直接

1<link href="/style.css" rel="stylesheet"/>

就可以了。

---------------------------------------------------------------

在记事本里都可以写,把扩展名改成.css即可。

Published At
Categories with Web编程
comments powered by Disqus