andybest
V2EX  ›  问与答

CSS 里以 + 和 * 开头的是什么意思?

  •  
  •   andybest · Mar 31, 2015 · 2743 views
    This topic created in 4087 days ago, the information mentioned may be changed or developed.
    看到一段 CSS:

    keep,.keepOn,.rss,.competence{float:left;padding-left:20px;background-position:-120px 0;line-height:18px;*line-height:20px;height:16px; color:#fff

    .keep,.keepOn,.rss,.competence{float:left;padding-left:20px;background-position:-120px 0;line-height:18px;+line-height:20px;height:16px; color:#fff

    其中有 *line-height:20px; 与 +line-height:20px;

    以 + 和 * 开头的是什么意思?
    8 replies    2015-03-31 18:41:49 +08:00
    chairuosen
        1
    chairuosen  
       Mar 31, 2015   ❤️ 1
    浏览器hack
    andybest
        2
    andybest  
    OP
       Mar 31, 2015
    @chairuosen 谢谢,具体有什么作用呢?
    zhanglp888
        3
    zhanglp888  
       Mar 31, 2015
    css hack
    zhanglp888
        4
    zhanglp888  
       Mar 31, 2015   ❤️ 1
    finian
        5
    finian  
       Mar 31, 2015
    CSS Hack,一种古老的 CSS 兼容技术,利用只有特定浏览器版本才能解析的「语法」来解决特定浏览器版本在 CSS 实现上的 bug
    Phariel
        6
    Phariel  
       Mar 31, 2015
    CSS hack,更多的是为了IE hack,除了给古老的天朝维护兼容古老的IE代码以外,完全不推荐这么做。
    catoncat
        7
    catoncat  
       Mar 31, 2015
    *{
    *YOU_KNOW_WHAT:expression(alert("FUCK IE"));
    }
    killerand1983
        8
    killerand1983  
       Mar 31, 2015
    IE浏览器造就了他····
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5360 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 01:13 · PVG 09:13 · LAX 18:13 · JFK 21:13
    ♥ Do have faith in what you're doing.