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

求助前端大神。

  •  
  •   weiruanniubi · 2019-08-25 20:05:27 +08:00 · 1020 次点击
    这是一个创建于 1677 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我就是想全站把:before给去掉,现在是这样的:

    .entry .entry-title:before {
    display: none;
    }
    .comments-area .comments-title-wrap .comments-title:before {
    display: none;
    }
    .post-navigation .nav-links .nav-next .meta-nav:after {
    display: none;
    }
    .post-navigation .nav-links .nav-previous .meta-nav:before {
    display: none;
    }
    
    这样太啰嗦了,能不能一句就把全站的:before去掉呢?

    6 条回复    2019-08-25 21:35:52 +08:00
    gy134340
        1
    gy134340  
       2019-08-25 20:12:55 +08:00
    * :before {
    display: none !important;
    }

    这样行吗
    sunjourney
        2
    sunjourney  
       2019-08-25 20:45:54 +08:00
    *::before {
    content: none;
    }
    sunjourney
        3
    sunjourney  
       2019-08-25 20:46:26 +08:00
    加个 !important 提高权重
    crazybinggan
        4
    crazybinggan  
       2019-08-25 21:22:05 +08:00
    还是乖乖这样写,如果像楼上那种全局的搞法,需要加 `!important`,然后你后面的接手有需要用到的,就懵逼了,要解决就继续用 `!important` 覆盖前面的,一发不可收拾,后果知道猜的到吧...
    weiruanniubi
        5
    weiruanniubi  
    OP
       2019-08-25 21:35:20 +08:00
    @gy134340
    @sunjourney
    感谢大神,解决了。
    weiruanniubi
        6
    weiruanniubi  
    OP
       2019-08-25 21:35:52 +08:00
    @crazybinggan 没事,是我自己的博客……
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5440 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 06:45 · PVG 14:45 · LAX 23:45 · JFK 02:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.