qichunren
V2EX  ›  V2EX

为什么v2ex右上区的那个box div会相差4个px?

  •  
  •   qichunren · Feb 13, 2012 · 3959 views
    This topic created in 5213 days ago, the information mentioned may be changed or developed.
    我在研究v2ex的html代码时发现一个怪问题,就是使用不同的html头DOCTYPE,未登录时的右上区的那个类名为box的div的高度会相差4px.

    v2ex现在的DOCTYPE是
    <pre>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    </pre>
    未登录时的右上区的那个类名为box的div的高度130px;

    而使用了HTML5的DOCTYPE
    <pre>
    <!DOCTYPE html>
    </pre>
    box的div的高度会多出4px,为134px

    有兴趣的同学可以用firebug看看,自己把html源代码搞到本地调试一下。

    为什么会出现这个问题呢?百思不得其解啊
    2 replies    1970-01-01 08:00:00 +08:00
    icyflash
        1
    icyflash  
       Feb 13, 2012
    .super.buttonr line-height
    qichunren
        2
    qichunren  
    OP
       Feb 14, 2012
    @icyflash 什么意思
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2688 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 90ms · UTC 11:50 · PVG 19:50 · LAX 04:50 · JFK 07:50
    ♥ Do have faith in what you're doing.