weiruanniubi
V2EX  ›  问与答

求助前端大神。

  •  
  •   weiruanniubi · Aug 25, 2019 · 1452 views
    This topic created in 2453 days ago, the information mentioned may be changed or developed.

    我就是想全站把: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 replies    2019-08-25 21:35:52 +08:00
    gy134340
        1
    gy134340  
       Aug 25, 2019
    * :before {
    display: none !important;
    }

    这样行吗
    sunjourney
        2
    sunjourney  
       Aug 25, 2019
    *::before {
    content: none;
    }
    sunjourney
        3
    sunjourney  
       Aug 25, 2019
    加个 !important 提高权重
    crazybinggan
        4
    crazybinggan  
       Aug 25, 2019
    还是乖乖这样写,如果像楼上那种全局的搞法,需要加 `!important`,然后你后面的接手有需要用到的,就懵逼了,要解决就继续用 `!important` 覆盖前面的,一发不可收拾,后果知道猜的到吧...
    weiruanniubi
        5
    weiruanniubi  
    OP
       Aug 25, 2019
    @gy134340
    @sunjourney
    感谢大神,解决了。
    weiruanniubi
        6
    weiruanniubi  
    OP
       Aug 25, 2019
    @crazybinggan 没事,是我自己的博客……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5521 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 07:43 · PVG 15:43 · LAX 00:43 · JFK 03:43
    ♥ Do have faith in what you're doing.