HTML: Strange space between iframe elements?

前端 未结 4 1996
谎友^
谎友^ 2020-12-29 06:50

Question:

Consider the following HTML:






4条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 07:55

    Just add

    
    

    or

    
    

    puts the browser into standards mode, where inline elements are placed on the baseline of the containing block and a space for the character descenders is always allocated in the line box. In other modes, that space is only created when there are printable characters on the same line as the iframes which isn't the case here. Moving the iframe off the baseline by either of the methods above allows the space for the descenders to be placed within the height of the iframe.

提交回复
热议问题