gpt4 book ai didi

css - 从用户端取消划掉 css 属性

转载 作者:行者123 更新时间:2023-11-28 13:01:36 25 4
gpt4 key购买 nike

当我在 Windows 7 中进入高对比度模式时,背景图像变得不可见。它是操作系统主动删除 CSS 中的所有 background 属性。 (我不确定这是如何工作的)。我想知道是否可以使用扩展或用户样式的 css 覆盖这些属性并使其可见。

例如,这里是 Amazon.com 上被划掉的背景图片的 CSS 属性(包括评级星星的图片)

.srSprite {
background: url("http://g-ecx.images-amazon.com/images/G/01/nav2/images/gui/searchSprite._V373035005_.gif") repeat scroll 0 0 transparent;
}

我试图通过将以下内容置于 Stylish 样式中来使它们可见。 Stylish 是一个用于自定义 CSS 的 Firefox 插件。

@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(ftp://){
.srSprite{
background: no-peat scroll 0 0 transparent !important;
display: inline-block !important;
margin: 0 !important;
overflow: hidden !important;
padding: 0 !important;
position: relative !important;
vertical-align: middle !important;

}
}

但是好像不行。是我做错了什么,还是有其他方法可以解决这个问题?

最佳答案

这是设计使然的行为。高对比度模式的目的是让一切都更容易访问,包括去除背景图像等可以降低对比度的“噪音”。

blog post有更多关于 Windows 高对比度模式范例的信息。我们大多数人(包括我在内)可能应该多考虑一些事情。

关于css - 从用户端取消划掉 css 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16124756/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com