网页添加灰色滤镜
创始人
2024-03-08 02:17:58
0

网页添加灰色滤镜

b站的灰色滤镜

image-20221201093325627

我校的灰色滤镜
在这里插入图片描述

CSDN的灰色滤镜

image-20221201094830690

自己调制css主题,给网页加上滤镜.

更快捷的,可以在可以调制css的浏览器插件中加上滤镜,只要开启插件就会自动修改网站滤镜

以darkreader为例打开其开发者工具

在这里插入图片描述

*INVERT
.jfk-bubble.gtx-bubble
.captcheck_answer_label > input + img
span#closed_text > img[src^="https://www.gstatic.com/images/branding/googlelogo"]
span[data-href^="https://www.hcaptcha.com/"] > #icon
#bit-notification-bar-iframe
::-webkit-calendar-picker-indicatorCSS
.vimvixen-hint {background-color: ${#ffd76e} !important;border-color: ${#c59d00} !important;color: ${#302505} !important;
}
html{	-webkit-filter: grayscale(0%);	-moz-filter: grayscale(0%);	-ms-filter: grayscale(0%);	-o-filter: grayscale(0%);	filter: grayscale(0%);
}
::placeholder {opacity: 0.5 !important;
}
#edge-translate-panel-body,
.MuiTypography-body1,
.nfe-quote-text {color: var(--darkreader-neutral-text) !important;
}
gr-main-header {background-color: ${lightblue} !important;
}
.tou-z65h9k,
.tou-mignzq,
.tou-1b6i2ox,
.tou-lnqlqk {background-color: var(--darkreader-neutral-background) !important;
}
.tou-75mvi {background-color: ${rgb(207, 236, 245)} !important;
}
.tou-ta9e87,
.tou-1w3fhi0,
.tou-1b8t2us,
.tou-py7lfi,
.tou-1lpmd9d,
.tou-1frrtv8,
.tou-17ezmgn {background-color: ${rgb(245, 245, 245)} !important;
}
.tou-uknfeu {background-color: ${rgb(250, 237, 218)} !important;
}
...

这就是darkreader默认的样式

该文件的结构是,首先是全局的设置,对所有网站起作用

然后是针对性的设置,只对有些域名的网站起作用.显然后面的css设置会覆盖前面的css设置,

darkreader的css设置会覆盖网站自己的css

我们只需要在全局位置覆盖网站自己的css

首先观察应该把覆盖css放到哪里,以我校课程网站为例

image-20221201094203916

这个滤镜在head的style元素中,调的是整个html的属性

也就是说,真正有效的是

html{	-webkit-filter: grayscale(100%);	-moz-filter: grayscale(100%);	-ms-filter: grayscale(100%);	-o-filter: grayscale(100%);	filter: grayscale(100%);
}

这里调整百分比可以设置滤镜灰度

只需要把这个添加到darkreader中的全局位置然后apply
在这里插入图片描述

此后不管访问什么网页,只要打开darkreader,一定带上灰色滤镜

比如github

image-20221201095054001

相关内容

热门资讯

AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
银河麒麟V10SP1高级服务器... 银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
AWR报告解读 WORKLOAD REPOSITORY PDB report (PDB snapshots) AW...
AWS管理控制台菜单和权限 要在AWS管理控制台中创建菜单和权限,您可以使用AWS Identity and Access Ma...
​ToDesk 远程工具安装及... 目录 前言 ToDesk 优势 ToDesk 下载安装 ToDesk 功能展示 文件传输 设备链接 ...
群晖外网访问终极解决方法:IP... 写在前面的话 受够了群晖的quickconnet的小水管了,急需一个新的解决方法&#x...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...
Azure构建流程(Power... 这可能是由于配置错误导致的问题。请检查构建流程任务中的“发布构建制品”步骤,确保正确配置了“Arti...