您现在的位置:首页 >> WEB >> 内容

如何改变链接颜色

时间:2025/5/29 16:26:34 点击:

  核心提示: 直接在CSS文件中添加一个定义链接就是了,在需要的地方调用,比如:/*网站链接总的CSS定义:可定义内容为链接字体颜色、样式等*/a{text-decoration: underline;} /*链...
直接在CSS文件中添加一个定义链接就是了,在需要的地方调用,比如:

/*网站链接总的CSS定义:可定义内容为链接字体颜色、样式等*/

a{text-decoration: underline;} /*链接无下划线none,有为underline*/
a:link {color: #00007f;text-decoration: underline;} /*未访问的链接 */
a:visited {color: #65038e;text-decoration: underline;} /*已访问的链接*/
a:hover{color: #ff0000;text-decoration: underline;} /*鼠标在链接上 */
a:active {color: #ff0000;text-decoration: underline} /*点击激活链接*/

下面是添加的调用黑色(颜色你可以自己选择)链接的定义,链接调用的地方是这样的

/*链接带有下划线的CSS定义--调用代码为****/

a.Channel1:link {color: #000000;text-decoration: none;} /*未访问的链接 */
a.Channel1:visited {color: #000000;text-decoration: none;} /*已访问的链接*/
a.Channel1:hover{color: #ff0000;text-decoration: underline;} /*鼠标在链接上 */
a.Channel1:active {color: #ff0000;text-decoration:none;} /*点击激活链接*/

作者:不详 来源:网络
  • 上一篇:没有了
  • 下一篇:没有了
  • 相关评论
    发表我的评论
    • 大名:
    • 内容:
    本类热门
    本类推荐
    • 没有
    本类固顶
    • 没有
  • 编程技巧(www.jtzk.net) © 2025 版权所有 All Rights Reserved.
  • Email:yhlllry@126.com 站长QQ:29858973 蜀ICP备2021017462号
  • Powered by laoy! V4.0.6