V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
kisshere
V2EX  ›  程序员

目前最简单轻量的实现图片瀑布流的 js 代码有吗?

  •  
  •   kisshere · Jul 23, 2019 · 1375 views
    This topic created in 2483 days ago, the information mentioned may be changed or developed.

    之前一直用 masonry,但是这个不仅比较臃肿,而且 masonry 必须等图片加载完了才能生成瀑布流,用 php 预定义图片宽高都不行。如果用纯 css-column 实现呢,这个又仅支持竖向排列,不能横向排列,舍弃之

    目前就想找一个最为简单轻量的 js 插件或代码,可以实现图片瀑布流,支持预定义宽高加快布局速度,不用等图片加载完了再显示,如:

    <img class="waterfall" data-width="300" data-height="536">
    

    先谢为敬

    meteor957
        1
    meteor957  
       Jul 23, 2019
    同问
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2899 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 11:25 · PVG 19:25 · LAX 04:25 · JFK 07:25
    ♥ Do have faith in what you're doing.