利用同一页面实现不同的颜色链接

之前一直没有注意这个问题 最近工作中遇到 就搜索了一下 具体解決方法是用CSS定义style 。例子如下 用Ctrl+C复制。需要注意的是这种方法好像只能用于也就是单个链接 不能定义表格 但单元格 也就是说用这个方法不能定义博客里面那些$show_log$标记或者某些建站程序的标签。

EXP:

<style type="text/css">
<!--
A.style1:link    {
    
text-decoration: none;
    
color:#666666;
    
font-weight: normal;
}
A.style1:visited {
    
text-decoration: none;
    
color: #666666;
    
font-weight: normal;
}
A.style1:active {
    
text-decoration: none;
    
color: #333333;
    
font-weight: normal;
}
A.style1:hover {
    
text-decoration: underline overline;
    
color: #333333;
    
font-weight: normal;
}
 
A.style2:link    {
    
text-decoration: none;
    
color:#000099;
    
font-weight: normal;
}
A.style2:visited {
    
text-decoration: none;
    
color: #000099;
    
font-weight: normal;
}
A.style2:active {
    
text-decoration: none;
    
color: red;
    
font-weight: normal;
}
A.style2:hover {
    
text-decoration: none;
    
color: red;
    
font-weight: normal;
    
font-size: 120%;
}
-->
</
style>

以下两个链接为演示:

style1.link

style2.link

当前没有评论!

第一个在本文留言。

发表评论

名字(必须)
邮箱(必须),(不会被公布)
网址(推荐)

字体为 粗体 是必填项目,邮箱地址 永远不会 被公布。

允许部分 HTML 代码:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs(网站链接)必须完整有效 (比如: http://www.sunnyfly.com/blog),所有标签都必须完整的关闭。

超出部分系统将会自动分段及换行。

请保证评论内容是与日志或 Blog 内容相关的,灌水、攻击性或不恰当的评论 可能 会被编辑或删除。

无觅相关文章插件,快速提升流量