主题:  如何在一个叶面中同时调用两个外部css文件/

chenlei5211

职务:普通成员
等级:1
金币:4.0
发贴:111
注册:2002/3/10 19:35:08
#12002/6/22 17:08:07
我做了一个叶面,并做了两个css文件.
担当我引用时,却只能引用一个!即使分别定义了不同的样式表,也只有一个1.css反映了出来(应用另一个2.css的效果显示的也是1.css)是怎末回事呀/
我该如何做/
谢谢



=ridincal=

职务:管理员
等级:7
金币:20.0
发贴:5886
注册:2004/1/13 11:47:04
#22002/6/22 17:15:45
如果两个样式表为同一对象定义样式,只能根据前一个定义。



chenlei5211

职务:普通成员
等级:1
金币:4.0
发贴:111
注册:2002/3/10 19:35:08
#32002/6/22 17:24:29
不是呀,我是为两个对象分别定义的1.css和2.css
但是这两个对象(文本)总是显示一样的效果
我定义的两个css是不同的,我是在dwmx中做的



孤魂野鬼

职务:普通成员
等级:2
金币:1.0
发贴:352
注册:2001/12/20 10:42:58
#42002/6/22 17:27:43
其实可以将两个CSS合成一个, 只要没有冲突!



=ridincal=

职务:管理员
等级:7
金币:20.0
发贴:5886
注册:2004/1/13 11:47:04
#52002/6/22 17:33:04
把你的两个CSS文件的代码贴出来。



chenlei5211

职务:普通成员
等级:1
金币:4.0
发贴:111
注册:2002/3/10 19:35:08
#62002/6/22 17:35:44
mycss.css:
.mycss { font-family: "宋体"; font-size: 12px; text-decoration: none; color: #333333}
a:active { text-decoration: none}
a:hover { text-decoration: underline}
a:link { font-family: "宋体"; text-decoration: none}
a:visited { color: #666666}
a:active { color: #666666}
a:hover { color: #000000}
a:link { color: #666666}
a:visited { }
a:active { font-family: "宋体"; font-size: 10pt}
a:hover { font-family: "宋体"; font-size: 10pt}
a:link { font-size: 10pt}
a:visited { font-family: "宋体"; font-size: 10pt}
p { font-family: "仿宋_GB2312"; font-size: 10pt}
a:active { }
a:active { }
p { }
a:link { }
a:hover { }
a:visited { }
a:active { }
a:visited { }
a:hover { }
a:active { }
a:link { }
p { text-decoration: none}
a:active { }
a:hover { }
a:active { }
a:link { }
a:visited { }
a:visited { }
.mycss { border-style: none}
a:active { }
a:active { }
a:active { }
a:hover { }
a:link { }
a:visited { text-decoration: none}
a:active { }
a:link { }


menu.css:
.menu {
    font-family: "宋体";
    font-size: 12px;
    color: #FFFFFF;
}
a:active { text-decoration: none}
a:hover { text-decoration: none}
a:link { font-family: "宋体"; text-decoration: none}
a:visited { color: #FFFFFF}
a:active { color: #FFFFFF}
a:hover { color: #FF9900}
a:link { color: #FFFFFF}
a:visited { }
a:active { font-family: "宋体"; font-size: 10pt}
a:hover { font-family: "宋体"; font-size: 10pt}
a:link { font-size: 10pt}
a:visited { font-family: "宋体"; font-size: 10pt}

谢谢



=ridincal=

职务:管理员
等级:7
金币:20.0
发贴:5886
注册:2004/1/13 11:47:04
#72002/6/22 20:06:10
这样当然不行了,
a:active { font-family: "宋体"; font-size: 10pt}
a:hover { font-family: "宋体"; font-size: 10pt}
a:link { font-size: 10pt}
a:visited { font-family: "宋体"; font-size: 10pt}
被你重复的定义了,如果你要为不同的连接使用不同的样式可以定义成
a.a1:active { font-family: "宋体"; font-size: 10pt}
a.a1:hover { font-family: "宋体"; font-size: 10pt}
a.a1:link { font-size: 10pt}
a.a1:visited { font-family: "宋体"; font-size: 10pt}

a.a2:active { font-family: "宋体"; font-size: 10pt}
a.a2:hover { font-family: "宋体"; font-size: 10pt}
a.a2:link { font-size: 10pt}
a.a2:visited { font-family: "宋体"; font-size: 10pt}

然后
A1
A2



chenlei5211

职务:普通成员
等级:1
金币:4.0
发贴:111
注册:2002/3/10 19:35:08
#82002/6/23 1:55:23
哦,知道了
太谢谢你了!!!
谢谢