css - 我在同一个位置有多个链接(到同一个 href 链接)。a:visited 在单击时会全部更改。我可以把每个分开吗?
问题描述
我尝试使用一个类,也尝试为每个链接使用唯一的类,但我仍然让所有链接“访问”,只有一个被点击。我想知道是否有办法让每个“访问”都唯一,即使一个 href 去同一个地方。太感谢了。
a.bluelist:link{
color:#00a9ff;
}
a.bluelist:hover{
color: #4dc3ff;
}
a.bluelist:visited{
color: #b99aff;
}
/*next option I tried is to change and make classes unique*/
a.bluelist1:link{
color:#00a9ff;
}
a.bluelist1:hover{
color: #4dc3ff;
}
a.bluelist1:visited{
color: #b99aff;
}
a.bluelist2:link{
color:#00a9ff;
}
a.bluelist2:hover{
color: #4dc3ff;
}
a.bluelist2:visited{
color: #b99aff;
}
a.bluelist3:link{
color:#00a9ff;
}
a.bluelist3:hover{
color: #4dc3ff;
}
a.bluelist3:visited{
color: #b99aff;
}
a.bluelist4:link{
color:#00a9ff;
}
a.bluelist4:hover{
color: #4dc3ff;
}
a.bluelist4:visited{
color: #b99aff;
}
<a href="#gohere" class="bluelist">Text1</a>
<br>
<a href="#gohere" class="bluelist">Text2</a>
<br>
<a href="#gohere" class="bluelist">Text3</a>
<br>
<a href="#goelsewhere" class="bluelist">Text4</a>
<br>
/*Next option I tried is here*/
<a href="#gohere" class="bluelist1">Text1</a>
<br>
<a href="#gohere" class="bluelist2">Text2</a>
<br>
<a href="#gohere" class="bluelist3">Text3</a>
<br>
<a href="#goelsewhere" class="bluelist4">Text4</a>
解决方案
推荐阅读
- linkedin - 我可以使用 Linkedin api v1 吗?
- matlab - 如何从不同大小的矩阵生成堆叠直方图?
- google-kubernetes-engine - GKE - 无法部署入口:获取“默认后端 - 404”或“502”
- c# - 如何使角色遵循易于管理的角色
- javascript - 未捕获的错误:元素类型无效:应为字符串(用于内置组件)或类/函数...单击“添加”按钮后
- javascript - 重新渲染 FieldControl 反应反应形式
- javascript - 如果条件,javascript中稍微不同的字符串的正则表达式
- r - 出现错误“所有格式都无法解析。找不到格式”
- reactjs - 查找从 API 调用返回未定义的函数
- c# - 如何从数组中删除每次出现