单击锚标记时背景颜色发生了变化。 [英] Background colour changed when i click anchor tag.

查看:58
本文介绍了单击锚标记时背景颜色发生了变化。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Please help
If i click anchor tag then this page is active and background colour changed.

<ul>
    <li><a href="index.php">HOME</a></li>
    <li><a href="two.php">PORTFOLIO</a></li>
    <li><a href="three.php">ABOUT</a></li>
    <li><a href="four.php">CONTACT</a></li>
    <li><a href="five.php">SHOP</a></li>
</ul>

推荐答案

You try this CSS style: I hope you asking for this only.

//normal link
ul li a
{
 color:#FFF;
}

//while mouse hover
ul li a:hover
{
 color:#FFF;

}

//hold the link
ul li a:active
{
 color:#FC0;
}

//after clicked
ul li a:visited
{
 color:#ff0;
}


这篇关于单击锚标记时背景颜色发生了变化。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆