我正在尝试创建一个用户样式(作为用户脚本安装在Google Chrome中)。隐藏页面上的所有内容并仅显示图像只是一些 CSS 。
html { height:100%;
background:url(http://i.imgur.com/oqhgG.png) no-repeat center fixed #FFFFFF !important;
overflow:hidden;
}
*:not(html) { display:none; }
我想说我在这里对 CSS 的理解有问题,但这在Mozilla Firefox中有效(将此代码粘贴到userContent.css中,它的行为符合预期)。
还尝试body
了代替html
,visibility:collapse;
代替display:none;
和更具体的:not
选择器。
下面是userstyles.org如何将此 CSS 变成用户脚本
请解释一下这里发生了什么!非常感谢!