Does anyone know how Pinterest.com's layout works?

前端 未结 8 1156
时光说笑
时光说笑 2020-12-13 15:06

On http://pinterest.com/ there are \'pins\' ie

s of varying height but they all seem to render very well with no \'gaps\' or line breaks to interrupt the flow. Is
8条回答
  •  悲&欢浪女
    2020-12-13 15:20

    Css can't actually do that in the way you want it to. Javascript, like this example, can.

    Due to how rows of floated or inline-blocked content behave, css isn't right for the job. You'd have to dynamically generate vertical columns of content and place them side by side, meaning you'd have to fight to get current content at the top. It would be kind of a pain, really. You'd also lose the responsiveness to window width.

提交回复
热议问题