admin管理员组文章数量:1424377
I need to build a small image collage. Like this:
I came pretty close with a flexbox and overflow:hidden;
but it has too many draw backs. Like some posts get cut off.
I also came close with masonry.js but that wasn't ideal either. There was some weird gaps and image order gets scrambled.
I'm doing it in a Wordpress template so HTMl,PHP,CSS,JS is all good. GUI is good too, whatever.
Ideally the first image would be the newest post, Second is second newest and so on up to six.
The size labels I put on the image are kinda flexible, as long as it scales for different size screens.
If plugins are needed to resize images, create different sizes, etc. I'll try it.
The images are a custom WP field (main_image) from a post content type.
I need to build a small image collage. Like this:
I came pretty close with a flexbox and overflow:hidden;
but it has too many draw backs. Like some posts get cut off.
I also came close with masonry.js but that wasn't ideal either. There was some weird gaps and image order gets scrambled.
I'm doing it in a Wordpress template so HTMl,PHP,CSS,JS is all good. GUI is good too, whatever.
Ideally the first image would be the newest post, Second is second newest and so on up to six.
The size labels I put on the image are kinda flexible, as long as it scales for different size screens.
If plugins are needed to resize images, create different sizes, etc. I'll try it.
The images are a custom WP field (main_image) from a post content type.
1 Answer
Reset to default 3Read some of masonry in this link
本文标签: javascriptBuild a dynamic and responsive image collageStack Overflow
版权声明:本文标题:javascript - Build a dynamic and responsive image collage - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745424884a2658064.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论