谷歌浏览器与设置:访问CSS属性有问题吗? [英] Does google chrome has issue with setting a:visited css properties?

查看:140
本文介绍了谷歌浏览器与设置:访问CSS属性有问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只想知道有没有人有和我一样的问题。基本上,我无法将访问超链接的背景颜色设置为不同的背景颜色。



这是Google Chrome的一个已知问题吗?我看到有人用背景图像提出类似的问题。设置颜色属性似乎工作正常。



这是我使用的代码:

  a:visited {
background-color:red;
}

任何信息将不胜感激。



亲切的问候,
Andrew

解决方案

改为使用以下内容:
$ b

  a {
background-color:white;
}

a:visited {
background-color:red;



$ b为了安全起见,非常严格地限制了使用:visited选择器可以做什么。


Just want to find out if anyone out there is also having the same issue as i am. Basically, I am unable to set the background color for a visited hyperlink to different background-color.

Is this a known issue for Google Chrome? I have seen people raising similar issue with background-image. setting the color attribute seems to be working fine.

this is the code that i used:

a:visited{
    background-color: red;
}

Any information would be appreciated.

Kind Regards, Andrew

解决方案

Instead, use the following:

a {
   background-color: white;
}

a:visited{
    background-color: red;
}

For security reasons -- specifically, in order to prevent history sniffing -- Chrome limits very strictly what can be done using the :visited selector.

这篇关于谷歌浏览器与设置:访问CSS属性有问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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