CSS columns bug — 5 column count only showing 4 (with images)

前端 未结 3 676
夕颜
夕颜 2020-12-10 19:08

I am trying to implement Chris Coyier\'s example of using CSS columns to create a seamless responsive grid of images.

I put Chris\'s files onto my server and everyth

3条回答
  •  抹茶落季
    2020-12-10 19:23

    When my browser hits 1219 px wide (at least as Firesize tells me) I get 5 cols. Below that I get 4 as well. Firefox 10.

    Some things that may be going on:

    • My vertical scrollbar is exactly 19 px wide
    • The border left and right of the Firefox window are 9 px each, making 18px total

    It almost seems as one of these is being included in the media query.


    Edit: kinda weird though, because at first glance the W3 media queries site seems to suggest that:

    The ‘width’ media feature describes the width of the targeted display area of the output device. For continuous media, this is the width of the viewport (as described by CSS2, section 9.1.1 [CSS21]) including the size of a rendered scroll bar (if any)

提交回复
热议问题