【发布时间】:2012-04-30 12:47:55
【问题描述】:
我的链接有问题,我创建了一个由链接组成的菜单,同时指示用户他在哪个部分。 菜单工作正常,但是当我开始在该链接下的部分上执行操作时(它是伪类活动的,因为它已被选中)然后选择的链接更改为普通链接,因此用户将失去方向。
我认为代码不是必需的,但以防万一有人需要。
.menu
{
width:100%;
text-align:center;
}
.menu a
{
height:30px;
width:170px;
background-image:url('../Images/item.png');
background-repeat:no-repeat;
background-position:center;
color:Black;
font-weight: bold;
font-family: Arial;
font-size: 11px;
text-decoration: none;
cursor:pointer;
word-spacing:-1px;
border:none;
padding:1px 0px 0px 0px;
margin-top:1px;
}
.menu a:hover
{
background-image:url('../Images/itemHover.png');
background-repeat:no-repeat;
background-position:center;
font-weight: bold;
font-family: Arial;
font-size: 11px;
text-decoration: none;
cursor:pointer;
word-spacing:-1px;
}
.menu a:active
{
background-image:url('../Images/itemActive.png');
background-repeat:no-repeat;
background-position:center;
color:White;
font-weight: bold;
font-family: Arial;
font-size: 11px;
text-decoration: none;
cursor:pointer;
word-spacing:-1px;
text-decoration: none;
}
<div class="menu" >
<a href='vbscript:show(0)' id='focusme'>Section1</a>
<a href='vbscript:show(6)'> Section2 </a>
<a href='vbscript:show(2)'> Section3 </a>
<a href='vbscript:show(3)'> Section4 </a>
<a href='vbscript:show(4)'> Section5</a>
<a href='vbscript:show(5)'> Section6 </a>
<a href='vbscript:show(1)'> Section7</a>
<a href='vbscript:show(7)'> Section8 </a>
<a href='vbscript:show(8)'> Section9 </a>
<a href="javascript:calllast24()"> Section10</a>
</div>
有人可以给我一个提示吗?
【问题讨论】: