- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
我无法从已访问的链接中删除下划线。在我的电脑中,下面的 Fiddle 在任何浏览器(Chrome、Firefox 和 IE 的当前版本)中显示访问链接的黑色、带下划线文本。
a:link { color: red; text-decoration: underline; }
a:visited { color: black; text-decoration: none; }
<p><a href="http://www.nevervisited.com">This link is not visited.</a></p>
<p><a href="http://www.google.com">This is link is visited.</a></p>
这是 Chrome 的已访问链接检查器。
我怀疑a:visited
变灰与此有关,但是this question关于灰色样式对我没有任何帮助,尽管它帮助了许多其他人。
这些答案( this , this )表明规范不关心子元素的 text-decoration
当他们的祖先定义它时,但我认为这里不是这种情况。我的<a>
s 没有带下划线的 parent ,我也不是使用伪元素,而是伪类。
还有,为什么Chrome应用a:link
到访问过的链接,如果 W3C说
The two states [
a:link
anda:visited
] are mutually exclusive.
也许这与用户代理从网站隐藏私有(private)信息有关,就像 W3C 在前面引述之后建议的那样?这:
Note. It is possible for style sheet authors to abuse the
:link
and:visited
pseudo-classes to determine which sites a user has visited without the user's consent.UAs may therefore treat all links as unvisited links, or implement other measures to preserve the user's privacy while rendering visited and unvisited links differently.
最佳答案
在大多数基于 Webkit 的浏览器(如 Safari)或基于 Blink 的浏览器(Chrome 和 Opera)中,您可以在 a:visited
链接上应用的唯一 CSS 属性是 color
.别的什么都行不通。它与浏览器历史记录窃取有关。您可以从这里阅读更多相关信息:
http://seclists.org/fulldisclosure/2013/May/13
但是,您可以使用 {text-decoration: none;}
更改所有链接的样式。
选择器本身并不危险,但如果将它与 Javascript 的函数结合使用,例如 getComputedStyle()事情可能会变得非常丑陋,我所说的丑陋是指其他用户可以查看和阅读您的个人浏览器历史记录。
Mozilla(Gecko 引擎)limited the selector properties到 color
, background-color
, border-*-color
.
关于css - 浏览器不接受 :visited { text-decoration: none; },我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31194553/
我看过的每个示例和样式表都使用 a:visited 来设置链接样式。除了a:visited具有更高的特异性,:visited不应该是等价的和更简单的吗? 最佳答案 TL;DR:在撰写本文时,您是完全正
每当我激活 Woocommerce 时,Woocommerce 都会在 Wordpress 的管理栏中添加“访问商店”。这导致我在那里同时拥有“访问站点”和“访问商店”。 但是,我真的看不出这样做有什
我已经看到了两种方式的例子,特别是维基百科展示了一个例子,其中被访问的对象决定了访问顺序,我认为这是一种听起来很合理的方法。 我处于需要多个访问顺序的情况,因此让访问者决定访问顺序似乎是合理的。但是,
我的网站上有我的帖子模型。我的帖子模型有一个存储访问的列。当用户访问我的帖子时,应该递增 1。我完全知道该怎么做,但我的问题是当我在我的模型中将它递增 1 时,它递增 2!!!!! 我在我的 Cont
使用 C++14,我使用 boost::variant作为编译时多态的一种方式: using MyType = boost::variant; 这两个类都有一个方法 sayHello() .我想调用:
我在使用 a:visited(或另一个可能?)伪类时遇到问题。我想让链接在不同的元素中显示为不同的颜色(.link-box 中的黑色和#main-menu 中的红色,无论它们是否被访问过),他们首先这
nav ul li a:link, a:visited nav ul li a, visited 第一次,我使用方法1 为导航栏中的链接设置颜色。然后,当我在 section 中创建链接时,它采用存储
我已经在 IE F12 开发人员工具下运行了我的 Sharepoint 网站,控制台在我的 HTML 开头提到了以下错误:- SEC7115: :visited and :link styles ca
这篇文章的目的是什么? 在 bigquery 中,我需要使用 caveat 删除重复的行 对于访问者访问具有相同页面名称的页面,重复发生在同一次访问中。 分组不能解决问题 下面,我已尽我所能解释数据、
我有这个 php 代码: mysqli_query($link, 'UPDATE `blog_posts` SET `visit` = `visit` + 1 WHERE `id` = ' . $po
我有一张表,其中包含访问、已完成的应用程序和批准,每行作为邮政编码,我试图将表转换为每行是访问的表。由于我在 Excel 中,我试图在 VBA 中编写一个宏来执行此操作,但这给了我一些不准确的地方。这
我有一个列出信息的页面,您可以在其中单击链接以获取更多详细信息。这些链接中的大多数都是正常的(即没有类),但在某些链接上我设置了类“未发布”(用于未发布的更改),其中样式设置为 color: red
我有一个列出信息的页面,您可以在其中单击链接以获取更多详细信息。这些链接中的大多数都是正常的(即没有类),但在某些链接上我设置了类“未发布”(用于未发布的更改),其中样式设置为 color: red
我在一个数学网站上工作,它有一些练习,页面底部有解决方案。我想让解决方案在用户滚动时隐藏起来,并且需要单击该 block 才能显示答案。我只想使用 css 和 html 来实现这一点。这是我到目前为止
在我的浏览器中,Mac OS 上的 Chrome,文本装饰和背景颜色不适用于以下代码: http://jsfiddle.net/5CYHZ/10/ 为什么会这样? 最佳答案 Mozilla出于隐私原因
我无法在 Firefox 或 IE 中处理 a:visited 超链接 如果我设置 a:visited 的背景颜色,它会正常工作,但不透明度不会设置。 有什么想法吗? 这是我的CSS: a.photo
我正在尝试使用 std::visit 来检查 std::variant。 首先,我声明变体和变体的基(可调用)访问者类: #include #include #include using Ama
我有一个页面,我们在其中显示嵌入式画面仪表板,并且在同一页面上有一个下拉菜单,用户可以使用该下拉菜单加载不同的仪表板,单击我调用的下拉选项 Turbolinks.visit(url, {action:
我想更改页面上两个链接的访问颜色。我有办法做到这一点吗? 最佳答案 仅在您想要不同访问颜色的链接上放置一个类,例如: Different 在 CSS 中,然后以您想要的任何方式设置已访问过的链接类别的
不确定这是否可能,而不必经过几次传递,但我无论如何都会问(我的 XSL 有点生锈) 我有一个 XML 文档,其中包含如下节点:
我是一名优秀的程序员,十分优秀!