Two column Masonry jQuery with different width?

放肆的年华 提交于 2019-12-11 10:43:15

问题


I am current working on a custom theme using Masonry. I successfully implemented masonry but i unfortunately, i can't figure out how can i implement a two column with different sizes.

to have a clear view of what i'm trying to do, you can take a look at the image:

the problem i encounter is i only can make a similar width. in my example, i want to have the first column (let's say) width = 250px and the 2nd column is comlumn = 400px.

Thank you very much for your help.


回答1:


i guess the work around will be as follows

$('.col2').css({'width':400});
$('.col1').css({'width':250});

after you apply the plugin . and edit other proprieties if required



来源:https://stackoverflow.com/questions/15182062/two-column-masonry-jquery-with-different-width

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!