V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
cheneydog
V2EX  ›  问与答

今天的奇怪问题, filter 对 body 的 background-img 不生效。

  •  
  •   cheneydog · 2020-04-04 09:13:45 +08:00 · 1391 次点击
    这是一个创建于 1477 天前的主题,其中的信息可能已经有所发展或是发生改变。

    统一改了 CSS filter: grayscale(100%); 发现部分网站没有完全生效,检查了下,只背景配置在 body 上的,背景还是彩色的。

    有没有人遇到过?怎么统一解决?

    2 条回复    2020-04-04 20:45:43 +08:00
    AS7wd1
        1
    AS7wd1  
       2020-04-04 10:16:26 +08:00   ❤️ 1
    body{
    background-blend-mode: luminosity;
    background-color: 任意饱和度为 0 的颜色,比如#fff,#000,#ccc;
    }
    cheneydog
        2
    cheneydog  
    OP
       2020-04-04 20:45:43 +08:00
    @AS7wd1 谢谢,简单可行。能细说下为啥 body 这么秀么?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2806 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 02:17 · PVG 10:17 · LAX 19:17 · JFK 22:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.