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

标签 css firefox css-sprites

当我在 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/

相关文章:

javascript - 我需要为我的 div 从右边的页面到中间设置动画

css - 如何在 firefox 插件中创建垂直标签?

google-chrome - 从封闭的网络应用程序在 Chrome 或 Firefox 中发送桌面通知?

css - 使用 CSS sprites 同时仍然支持高密度显示

css - 使用 将 "col-lg-12"放入响应式容器中

html - 如何去掉div前的空格

ID 更改时的 jQuery 动画

javascript - angularJS 在 Firefox 中的糟糕表现

html - Opera 是否错误处理了带有百分比值的背景位置和/或背景大小?

css - 如何创建一个像单个图像一样水平和垂直拉伸(stretch)的图像 Sprite ?