作者shenbu (dj)
看板Web_Design
标题Re: [问题] 如何用CSS将网页中的连结变不同颜色
时间Mon Jun 26 22:04:57 2006
※ 引述《Falldog (嘿嘿~)》之铭言:
: 一般的做法是将一开始时
: <style>
: A.link{ ... }
: </style>
: 但是这样会改到页面中所有的连结
: 请问可以将页面中一部分的连结变不一样的颜色吗?
这个问题我之前有问过了呀
後来我就学会了 :)
http://www.fpppc.gov.tw/%7Ebtln-6/htm/about_us/corpphoto/
corpphoto_20060203.htm
go back跟最下面的600-003的连结有不同
这样写就可以了
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: underline;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
a.b:link {
color: #666666;
text-decoration: underline;
}
a.b:visited {
text-decoration: underline;
color: #666666;
}
a.b:hover {
text-decoration: underline;
color: #366402;
}
a.b:active {
text-decoration: underline;
color: #666666;
这个a.b 你贴进去後就会看到样式里有b可以选
我还试过这种的喔 你看 :D
http://www.fpppc.gov.tw/%7Ebtln-6/htm/about_us/substitute/substitute_qanda.htm
中间的的联结跟右边的联结是不一样的样式
中间连结的写法是这样
a.c:link {color: #2C5717;}
a.c:visited {color: #2C5717;}
a.c:hover {color: #FFFFFF;background:#2C5717;text-decoration: none;}
a.c:active {color: #FFFFFF;background:#2C5717;text-decoration: none;
}
这是版上的人教我的 你自己试试看吧
go~
--
连我这种原始码大白痴都会了
你一定也学得起来 :)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.165.197.228
※ 编辑: shenbu 来自: 218.165.197.228 (06/26 22:05)
※ 编辑: shenbu 来自: 218.165.197.228 (06/26 22:05)
1F:推 Falldog:感谢你~:) 06/27 01:32