问题描述
在我的网站上,当我单击具有href或onclick引用的链接时,它会以蓝色突出显示,以结束我的设计。如何删除?在菜单图标中看到一个带有“ onclick”参考的示例,从我在手机上单击该按钮起,我就设法进行打印。 我该如何删除?
The icon is blue that I did not program,all links on the site look like this
解决方法
如果media screen
解决方案适合您。可以的:
@media screen and (max-width:500px) {
.selector:active,.selector:hover {
background-color: unset;
color: #999;
}
}
,
鉴于我们正在使用“ a”元素,您可以使用基本的css轻松摆脱蓝色突出显示的地方:
a:hover,a:focus,a:active {
text-decoration: none;
color: #3c4146 /* Just a mild gray,you can change this to whatever you want */
}
如果元素不同(在您的情况下看起来像是具有设置背景的btn / div),则可以使CSS适应它。 悬停,聚焦或将元素设置为活动状态时,可以将bg设置回其原始颜色。
.element:focus,.element:active,.element:hover {
background-color: #000000; /* Use the original element background-color here */
}