jacob
V2EX  ›  问与答

chrome 下用stylish如何隐藏没有类或id的div,或者用adblock也行?

  •  
  •   jacob · Oct 14, 2011 · 5446 views
    This topic created in 5328 days ago, the information mentioned may be changed or developed.
    4 replies    1970-01-01 08:00:00 +08:00
    leojoy710
        1
    leojoy710  
       Oct 14, 2011
    <script src="http://gist.github.com/1286471.js"></script>
    leojoy710
        2
    leojoy710  
       Oct 14, 2011
    div{
    display:none;
    }
    div[id],div[class]{
    display:block;
    }
    fordragon
        3
    fordragon  
       Oct 14, 2011
    chrome支持CSS3,用nth-child选择符可以取到任何元素
    比如,foo:nth-child(0n+5) 也可以直接写成foo:nth-child(5)

    参见W3C文档
    http://www.w3.org/TR/selectors/#nth-child-pseudo
    jacob
        4
    jacob  
    OP
       Oct 14, 2011
    @fordragon

    O(∩_∩)O谢谢,我看一下,现在用的属性选择器把图片以藏了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3072 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 13:45 · PVG 21:45 · LAX 06:45 · JFK 09:45
    ♥ Do have faith in what you're doing.